Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
package main
import (
type Profile struct {
Name string
Age uint
Verified bool
func main() {
var version string
var profile Profile // new added
flag.StringVar(&version, "setVersion", "1.0.0", "")
flag.Var(&profile, "setProfile", "") // new added
fmt.Println("version = ", version)
fmt.Println("profile = ", profile) // new added
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment