Example #1
0
func main() {
	if h {
		flag.PrintDefaults()
	}
	fmt.Printf("%s\n", str)
	fmt.Printf("%s\n", flag.Lookup("s").Value.String())
}
Example #2
0
func main() {
	if h {
		flag.PrintDefaults()
	}
	fmt.Printf("s/#hidden/-string: %s\n", str)
	fmt.Printf("b: %b\n", b)
	fmt.Printf("-bool: %b\n", b2)
	fmt.Printf("s/#hidden/-string(via lookup): %s\n", flag.Lookup("s").Value.String())
}
Example #3
0
func main() {
	if h {
		flag.PrintDefaults()
	} else {
		fmt.Printf("s/#hidden/-string: %s\n", str)
		fmt.Printf("b: %t\n", b)
		fmt.Printf("-bool: %t\n", b2)
		fmt.Printf("s/#hidden/-string(via lookup): %s\n", flag.Lookup("s").Value.String())
		fmt.Printf("ARGS: %v\n", flag.Args())
	}
}