Skip to content
Snippets Groups Projects
Commit f9c6bea3 authored by Rohith Jayawardene's avatar Rohith Jayawardene Committed by GitHub
Browse files

CLI Relfection (#176)

- forgot to add the parsing of Duration and unit64 types (capturing the time.Duration really)
parent 260d2c81
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,11 @@
#### **2.0.2**
FEATURES:
* adding the --enable-cors-global to switch on CORs header injects into every response
* adding the --enable-cors-global to switch on CORs header injects into every response [#PR174](https://github.com/gambol99/keycloak-proxy/pull/174)
BUGS:
* Fixed the time.Duration flags in the reflection code [#PR173](https://github.com/gambol99/keycloak-proxy/pull/173)
* Fixed the environment variable type [#PR176](https://github.com/gambol99/keycloak-proxy/pull/176)
#### **2.0.1**
......
......@@ -172,6 +172,13 @@ func parseCLIOptions(cx *cli.Context, config *Config) (err error) {
for _, x := range cx.StringSlice(name) {
reflect.Append(reflect.ValueOf(config).Elem().FieldByName(field.Name), reflect.ValueOf(x))
}
case reflect.Int64:
switch field.Type.String() {
case "time.Duration":
reflect.ValueOf(config).Elem().FieldByName(field.Name).SetInt(int64(cx.Duration(name)))
default:
reflect.ValueOf(config).Elem().FieldByName(field.Name).SetInt(cx.Int64(name))
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment