2024-05-08 09:08:36 +02:00
|
|
|
/*
|
2024-05-29 08:59:15 +02:00
|
|
|
Copyright © 2024 raul <raul@bulgariu.xyz>
|
2024-05-08 09:08:36 +02:00
|
|
|
*/
|
2024-05-29 08:59:15 +02:00
|
|
|
|
2024-05-08 09:08:36 +02:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
var rootCmd = &cobra.Command{
|
|
|
|
Use: "aemet",
|
2024-05-29 08:59:15 +02:00
|
|
|
Short: "API Server that fetches spanish weather data from the AEMET",
|
|
|
|
Long: `API Server that fetches spanish weather data from the AEMET formatted
|
|
|
|
in XML and translates it to JSON, optionally allowing to render the
|
|
|
|
obtained data in a web page.`,
|
2024-05-08 09:08:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func Execute() {
|
|
|
|
err := rootCmd.Execute()
|
|
|
|
if err != nil {
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
|
|
|
|
}
|