envflag.go
func defaultedFlags() []string {
	m := make(map[string]bool)

	FlagSet.VisitAll(func(f *flag.Flag) {
		m[f.Name] = true
	})

	FlagSet.Visit(func(f *flag.Flag) {
		delete(m, f.Name)
	})

	s := make([]string, 0)

	for name, _ := range m {
		s = append(s, name)
	}

	return s
}
func defaultedFlags() []string {
	m := make(map[string]bool)

	FlagSet.VisitAll(func(f *flag.Flag) {
		m[f.Name] = true
	})

	FlagSet.Visit(func(f *flag.Flag) {
		delete(m, f.Name)
	})

	s := make([]string, 0)

	for name, _ := range m {
		s = append(s, name)
	}

	return s
}
// Flags that were not set via command-line arguments, and have defaulted. It's
// smart enough to respect a flag that was set to the default value via
// command-line arguments. Must be called after flag.Parse()