From f4ddb45fd2aeb033b81f9ef88cf2ba5c1b899107 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Thu, 19 Jun 2025 02:21:12 +0100 Subject: [PATCH] don't log.Fatal if we can't read version... --- main.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/main.go b/main.go index 9b2a37c..60d1762 100644 --- a/main.go +++ b/main.go @@ -3,7 +3,6 @@ package main import ( "context" - "log" "os" "runtime/debug" "strings" @@ -58,14 +57,6 @@ func init() { // main is the entry point of the application. // It executes the root command and handles any errors. func main() { - if version == "" { - info, ok := debug.ReadBuildInfo() - if !ok { - log.Fatal("could not read build info") - } - version = strings.Split(info.Main.Version, "-")[0] - } - if err := fang.Execute(context.Background(), rootCmd, fang.WithVersion(versionFromBuild())); err != nil { os.Exit(1) }