We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Given the following code
package main import ( "fmt" "github.com/creasty/defaults" ) type Kitten struct { MaxHP int `default:"powerfull"` } func main() { var k Kitten if err := defaults.Set(&k); err != nil { panic(fmt.Sprintf("Bad Kitty %v", err)) } else { fmt.Printf("Good Kitty %#v\n", k) } }
It prints "Good Kitty main.Kitten{MaxHP:0}" , I think Set should return an error in this case
Set
Playground link https://go.dev/play/p/KUi5L1hP-IF
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Given the following code
It prints "Good Kitty main.Kitten{MaxHP:0}" , I think
Set
should return an error in this casePlayground link https://go.dev/play/p/KUi5L1hP-IF
The text was updated successfully, but these errors were encountered: