add more option comments

This commit is contained in:
Jeff
2019-09-12 15:21:47 +08:00
committed by zryfish
parent 66af315a85
commit 5dde737e6c
10 changed files with 98 additions and 41 deletions

View File

@@ -31,12 +31,14 @@ func (l *LdapOptions) Validate() []error {
}
func (l *LdapOptions) ApplyTo(options *LdapOptions) {
reflectutils.Override(options, l)
if l.Host != "" {
reflectutils.Override(options, l)
}
}
func (l *LdapOptions) AddFlags(fs *pflag.FlagSet) {
fs.StringVar(&l.Host, "ldap-host", l.Host, ""+
"Ldap service host, if left blank, all of the following options will "+
"Ldap service host, if left blank, all of the following ldap options will "+
"be ignored and ldap will be disabled.")
fs.StringVar(&l.ManagerDN, "ldap-manager-dn", l.ManagerDN, ""+