Quick actions

cmd+k|ctrl+k

Navigation

Languages

Are Go flags typed?

Snippet info

Language

Go

Visibility

public

Author

barend

Created

2019-07-07T17:01:39Z

Updated

2019-07-07T17:02:36Z

package main

import (
	"flag"
	"fmt"
	"reflect"
)

func main() {
    // Click on the Gopher next to the "main.go" tab to change the run command
	a := flag.Int("a", 1234, "")

	flag.Parse()

	fmt.Println(reflect.TypeOf(a))
}
INFO