Not impl endpoints
This commit is contained in:
23
config/config.go
Normal file
23
config/config.go
Normal file
@@ -0,0 +1,23 @@
|
||||
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"))
|
||||
}
|
||||
Reference in New Issue
Block a user