-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: []time.Duration not works #39
Comments
An underlying type of time.Duration is int64. type MyStruct struct {
BackoffPolicy []time.Duration `default:"[10000000000,60000000000]"` // 10s, 1m
} #32 might be what you're looking for — pull requests are welcome. |
Here - https://github.com/creasty/defaults/blob/master/defaults.go#L86 code is trying to parse string and in test file i can find
https://github.com/creasty/defaults/blob/master/defaults_test.go#L48 What made me confused that in slice i need to change behavior))) |
Ahhh... |
@creasty using |
Sorry for the oversight! |
Example struct
Checked variants:
default:"{[\"10s\",\"1m\"]}"
default:"[\"10s\",\"1m\"]"
default:"[10s,1m]"
default:"\"10s\",\"1m\""
default:"10s,1m"
all of them not works
The text was updated successfully, but these errors were encountered: