From 7388a1b893c40926f7275c0a0b9ab4b589271de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20H=C3=A5rek=20Andreassen?= Date: Fri, 18 Oct 2024 09:38:21 +0200 Subject: [PATCH] refactor: Remove root cmd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tim HĂ„rek Andreassen --- cmd/root.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index d96dd0e..69363cc 100644 --- a/cmd/root.go +++ b/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) -}