Documentation
¶
Index ¶
- func EnvUsage(f string, env string) string
- type Address
- func (a *Address) EscapedPath() string
- func (a *Address) HasPort() bool
- func (a *Address) Hostname() string
- func (a *Address) HostnameAndPort() string
- func (a *Address) IsTCP() bool
- func (a *Address) Port() int
- func (a *Address) Scheme() string
- func (a *Address) String() string
- func (a *Address) URI() string
- type Flag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Address ¶
type Address struct {
// contains filtered or unexported fields
}
Address represents an address of the form hostname:port or a websocket URI.
func New ¶
New parses a hostname:port pair of the form "hostname[:port]" or "tcp://hostname[:port][/]", or a websocket URI of the form "ws://host/path". The returned address will have been validated.
func (*Address) EscapedPath ¶
EscapedPath returns the escaped form of the path. In general there are multiple possible escaped forms of any path.
func (*Address) HostnameAndPort ¶
HostnameAndPort returns "hostname[:port]".
type Flag ¶
type Flag struct {
// contains filtered or unexported fields
}
Flag defines an address flag. This satisfies the pcastools/flag.Flag interface.
func NewFlag ¶
func NewFlag(name string, addr **Address, defaultAddr *Address, description string, usage string) *Flag
NewFlag represents an address flag with the given name, description, and usage string. It has backing variable addr, with default value defaultAddr.
func (*Flag) Description ¶
Description returns a one-line description of this variable.