devlopment branch (#1736)

This commit is contained in:
zryfish
2020-01-02 20:52:00 +08:00
committed by GitHub
parent ff0ffe8650
commit eceadec69c
440 changed files with 61524 additions and 3699 deletions

View File

@@ -73,11 +73,11 @@ func (s *ServerRunOptions) Validate() []error {
return errs
}
func (s *ServerRunOptions) AddFlags(fs *pflag.FlagSet) {
func (s *ServerRunOptions) AddFlags(fs *pflag.FlagSet, c *ServerRunOptions) {
fs.StringVar(&s.BindAddress, "bind-address", "0.0.0.0", "server bind address")
fs.IntVar(&s.InsecurePort, "insecure-port", 9090, "insecure port number")
fs.IntVar(&s.SecurePort, "secure-port", 0, "secure port number")
fs.StringVar(&s.TlsCertFile, "tls-cert-file", "", "tls cert file")
fs.StringVar(&s.TlsPrivateKey, "tls-private-key", "", "tls private key")
fs.StringVar(&s.BindAddress, "bind-address", c.BindAddress, "server bind address")
fs.IntVar(&s.InsecurePort, "insecure-port", c.InsecurePort, "insecure port number")
fs.IntVar(&s.SecurePort, "secure-port", s.SecurePort, "secure port number")
fs.StringVar(&s.TlsCertFile, "tls-cert-file", c.TlsCertFile, "tls cert file")
fs.StringVar(&s.TlsPrivateKey, "tls-private-key", c.TlsPrivateKey, "tls private key")
}