It seems that both the --ldap-uri CLI flag and the GOLDAP_LDAP_URI environment variable config sources are broken. Setting ldap-uri via config file works, but it ignores the other (higher-precedence) config sources.
The order of precedence should go like this:
- CLI flags
-H / --ldap-uri
- Environment variable
GOLDAP_LDAP_URI
- Config file
ldap-uri
Output when specifying --ldap-uri:
$ goldap search --ldap-uri ldap://server.example.com
{"level":"debug","msg":"test in search command"}
{"level":"fatal","msg":"Failed to dial URI","uri":"","err":"LDAP Result Code 200 \"Network Error\": Unknown scheme ''"}
It seems that both the
--ldap-uriCLI flag and theGOLDAP_LDAP_URIenvironment variable config sources are broken. Settingldap-urivia config file works, but it ignores the other (higher-precedence) config sources.The order of precedence should go like this:
-H / --ldap-uriGOLDAP_LDAP_URIldap-uriOutput when specifying
--ldap-uri: