Documentation
¶
Index ¶
Constants ¶
View Source
const ( // FlagName is the name of the port flag. FlagName = "port" // FlagUsage is the usage of the port flag. It describes allowed values and the default port. FlagUsage = "Specify the port number for the server." )
Variables ¶
View Source
var (
ErrNilPortFlag = errors.New("port flag cannot be nil")
)
Functions ¶
Types ¶
type Flag ¶
Flag is a custom flag type for port, embedding goflags.Flag.
func NewFlag ¶
NewFlag creates a new Flag with allowed values.
Parameters:
defaultValue - the default value for the flag.
Returns:
A pointer to the created Flag.
Click to show internal directories.
Click to hide internal directories.