package
Version:
v0.0.0-...-a5a65f0
Opens a new window with list of versions in this module.
Published: Dec 30, 2017
License: Apache-2.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Listen is a replacement for net.Listen and supports
port, :port, ip:port, FD:<fd_num>, ADDR:<name>
Listeners are always TCP.
Usage returns a descriptive usage message for a flag given the name
of thing being addressed.
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()
NewFlag returns a flag that implements the flag.Value interface.
Listen returns the address's TCP listener.
Set implements the flag.Value interface.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.