[go] flag/varflag 패키지의 예제 코드
package main
import ( “flag” “fmt” )
func main() { var name string flag.StringVar(&name, “name”, “Anonymous”, “The name of the user”) flag.Parse() fmt.Printf(“Hello, %s!\n”, name) } ```
package main
import ( “flag” “fmt” )
func main() { var name string flag.StringVar(&name, “name”, “Anonymous”, “The name of the user”) flag.Parse() fmt.Printf(“Hello, %s!\n”, name) } ```