Created
June 12, 2021 01:15
-
-
Save oscarzhou/a4d68c8cab318d3b8470d98903473cfb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
) | |
func main() { | |
var version string | |
flag.StringVar(&version, "setVersion", "1.0.0", "") // parse the value of the flag setVersion to variable version | |
flag.Parse() | |
fmt.Println("version = ", version) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment