Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Listen ¶
Listen is a replacement for net.Listen and supports
port, :port, ip:port, FD:<fd_num>, ADDR:<name>
Listeners are always TCP.
Types ¶
type Addr ¶
type Addr struct {
// contains filtered or unexported fields
}
Addr is a flag variable. Use like:
var webPort listen.Addr flag.Var(&webPort, "web_addr", listen.Usage("Web server address")) flag.Parse() webListener, err := webPort.Listen()
func NewFlag ¶
NewFlag returns a flag that implements the flag.Value interface.
func (*Addr) Listen ¶
Listen returns the address's TCP listener.
Click to show internal directories.
Click to hide internal directories.