|
|
|
@ -1,6 +1,7 @@ |
|
|
|
package pypihub |
|
|
|
|
|
|
|
import ( |
|
|
|
"fmt" |
|
|
|
"os" |
|
|
|
"strings" |
|
|
|
|
|
|
|
@ -14,6 +15,10 @@ type Config struct { |
|
|
|
Bind string `arg:"-b,--bind,env:PYPIHUB_BIND,help:[<address>]:<port> to bind the server to (default: ':8287') (env: PYPIHUB_BIND)"` |
|
|
|
} |
|
|
|
|
|
|
|
func (c Config) Version() string { |
|
|
|
return fmt.Sprintf("pypihub %s", VERSION) |
|
|
|
} |
|
|
|
|
|
|
|
func ParseConfig() Config { |
|
|
|
var config = Config{ |
|
|
|
Bind: ":8287", |
|
|
|
|