2020-09-28 23:39:05 +00:00
|
|
|
package options
|
|
|
|
|
|
|
|
import (
|
|
|
|
"flag"
|
|
|
|
)
|
|
|
|
|
|
|
|
var Server *ServerConfig
|
|
|
|
|
|
|
|
type ServerConfig struct {
|
|
|
|
Addr string
|
|
|
|
TrustProxy bool
|
2020-10-21 03:59:10 +00:00
|
|
|
RepoList string
|
2020-09-28 23:39:05 +00:00
|
|
|
Compress bool
|
|
|
|
ServePath string
|
2020-09-29 03:15:30 +00:00
|
|
|
Exec string
|
2020-09-28 23:39:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
var ServerFlags *flag.FlagSet
|
|
|
|
var InitFlags *flag.FlagSet
|
|
|
|
var DefaultMaxBodySize int64 = 1024 * 1024
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
Server = &ServerConfig{}
|
|
|
|
ServerFlags = flag.NewFlagSet("run", flag.ExitOnError)
|
|
|
|
}
|