refactor: Remove root cmd
Signed-off-by: Tim Hårek Andreassen <tim@harek.no>
This commit is contained in:
parent
df389705a0
commit
7388a1b893
1 changed files with 0 additions and 10 deletions
10
cmd/root.go
10
cmd/root.go
|
@ -9,7 +9,6 @@ import (
|
|||
var rootCmd = &cobra.Command{
|
||||
Use: "yr",
|
||||
Short: "yr is CLI tool for weather forecasts",
|
||||
Run: root,
|
||||
}
|
||||
|
||||
func Execute() {
|
||||
|
@ -36,12 +35,3 @@ func init() {
|
|||
rootCmd.PersistentFlags().Float64VarP(&lon, "lon", "x", 0, "Longitude coordinate")
|
||||
rootCmd.PersistentFlags().Float64VarP(&lat, "lat", "y", 0, "Latitude coordinate")
|
||||
}
|
||||
|
||||
func root(cmd *cobra.Command, args []string) {
|
||||
if isWeb {
|
||||
openBrowser("https://www.yr.no/en", nil)
|
||||
}
|
||||
|
||||
err := cmd.Help()
|
||||
cobra.CheckErr(err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue