cosmetic: more consistent param/arg/var ordering re Port
This commit is contained in:
1 parent
065b632f91
commit
e89e3adc69
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -18,6 +18,7 @@ const macMaxAge = 10 * time.Minute // [1]
|
||||
// /proc/sys/net/ipv4_neigh/*/base_reachable_time_ms on Linux
|
||||
|
||||
type Router struct {
|
||||
Port int
|
||||
Iface *net.Interface
|
||||
Ourself *LocalPeer
|
||||
Macs *MacCache
|
||||
@@ -31,7 +32,6 @@ type Router struct {
|
||||
ConnLimit int
|
||||
BufSz int
|
||||
LogFrame func(string, []byte, *layers.Ethernet)
|
||||
Port int
|
||||
}
|
||||
|
||||
type PacketSource interface {
|
||||
|
||||
+2
-2
@@ -36,6 +36,7 @@ func main() {
|
||||
|
||||
var (
|
||||
justVersion bool
|
||||
port int
|
||||
ifaceName string
|
||||
routerName string
|
||||
nickName string
|
||||
@@ -46,11 +47,11 @@ func main() {
|
||||
peers []string
|
||||
connLimit int
|
||||
bufSz int
|
||||
port int
|
||||
httpAddr string
|
||||
)
|
||||
|
||||
flag.BoolVar(&justVersion, "version", false, "print version and exit")
|
||||
flag.IntVar(&port, "port", weave.Port, "router port")
|
||||
flag.StringVar(&ifaceName, "iface", "", "name of interface to capture/inject from (disabled if blank)")
|
||||
flag.StringVar(&routerName, "name", "", "name of router (defaults to MAC of interface)")
|
||||
flag.StringVar(&nickName, "nickname", "", "nickname of peer (defaults to hostname)")
|
||||
@@ -60,7 +61,6 @@ func main() {
|
||||
flag.StringVar(&prof, "profile", "", "enable profiling and write profiles to given path")
|
||||
flag.IntVar(&connLimit, "connlimit", 30, "connection limit (0 for unlimited)")
|
||||
flag.IntVar(&bufSz, "bufsz", 8, "capture buffer size in MB")
|
||||
flag.IntVar(&port, "port", weave.Port, "router port")
|
||||
flag.StringVar(&httpAddr, "httpaddr", fmt.Sprintf(":%d", weave.HTTPPort), "address to bind HTTP interface to (disabled if blank, absolute path indicates unix domain socket)")
|
||||
flag.Parse()
|
||||
peers = flag.Args()
|
||||
|
||||
Reference in new issue
Block a user