func newFlags(osArgs []string, osLookupEnvFunc func(string) (string, bool)) *Flags {
	if len(osArgs) == 0 {
		osArgs = []string{""}
	}
	programArgs := osArgs[1:]
	f := new(Flags)
	var portOverride int
	fs := f.newFlagSet(osLookupEnvFunc, &portOverride)
	fs.Parse(programArgs)
	if portOverride != 0 {
		f.HTTPSPort = portOverride
		f.HTTPPort = -1
	}
	return f
}
// newFlags creates a new, populated flags structure.
// Fields are populated from command line arguments.
// If fields are not specified on the command line, environment variable values are used before defaulting to other defaults.
newFlags creates a new, populated flags structure.
Fields are populated from command line arguments.
If fields are not specified on the command line, environment variable values are used before defaulting to other defaults.
// newFlags creates a new populated flags structure . // Fields are populated from command line arguments . // If fields are not specified on the command line environment variable values are used before defaulting to other defaults .
func newFlags(osArgs []string, osLookupEnvFunc func(string) (string, bool)) *Flags {
	if len(osArgs) == 0 {
		osArgs = []string{""}
	}
	programArgs := osArgs[1:]
	f := new(Flags)
	var portOverride int
	fs := f.newFlagSet(osLookupEnvFunc, &portOverride)
	fs.Parse(programArgs)
	if portOverride != 0 {
		f.HTTPSPort = portOverride
		f.HTTPPort = -1
	}
	return f
}
func newFlags ( osArgs [ ] string , osLookupEnvFunc func ( string ) ( string , bool ) ) * Flags { if len ( osArgs ) == 0 { osArgs = [ ] string { " " } } programArgs := osArgs [ 1 : ] f := new ( Flags ) var portOverride int fs := f . newFlagSet ( osLookupEnvFunc , & portOverride ) fs . Parse ( programArgs ) if portOverride != 0 { f . HTTPSPort = portOverride f . HTTPPort = - 1 } return f }
newFlags creates a new, populated flags structure.
newFlags creates a new populated flags structure .