|
package config
|
|
|
|
import (
|
|
"fmt"
|
|
"local/args"
|
|
)
|
|
|
|
var (
|
|
Port string
|
|
)
|
|
|
|
func init() {
|
|
New()
|
|
}
|
|
|
|
func New() {
|
|
as := args.NewArgSet()
|
|
as.Append(args.INT, "p", "port to listen on", 52222)
|
|
if err := as.Parse(); err != nil {
|
|
panic(err)
|
|
}
|
|
Port = fmt.Sprintf(":%d", as.GetInt("p"))
|
|
}
|