From 752451d77b6728700399e7a48e9be9d03fdc33dd Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 15 Apr 2021 02:15:55 -0600 Subject: [PATCH] fix typo --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bfddd74..58406f3 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,11 @@ See . package main +import ( + "fmt" + "strings" +) + var ( commit = "0000000" version = "0.0.0-pre0+0000000" @@ -35,7 +40,7 @@ var ( ) func main() { - if (len(os.Args) > 1 && "version" === os.Args[1]) { + if (len(os.Args) > 1 && "version" == strings.TrimLeft(os.Args[1], "-")) { fmt.Printf("Foobar v%s (%s) %s\n", version, commit[:7], date) } // ...