-
Notifications
You must be signed in to change notification settings - Fork 1
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
Uses Picard Unmarshalling in Tests also improves tests to be explicit… #54
Conversation
… about expectations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for improving our tests! Just have a couple style comments.
decoding/decoding.go
Outdated
@@ -8,7 +8,7 @@ import ( | |||
"github.com/modern-go/reflect2" | |||
jsoniter "github.com/plusplusben/json-iterator-go" | |||
"github.com/skuid/picard/metadata" | |||
"github.com/skuid/warden/pkg/mapvalue" | |||
"github.com/skuid/picard/stringutils" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call!
picard.go
Outdated
return false | ||
} | ||
|
||
func isZeroValue(v reflect.Value) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be better in some kind of reflect utils file (like your stringutils).
We can also use isZeroValue in another place.
stringutils/strings.go
Outdated
@@ -0,0 +1,11 @@ | |||
package stringutils |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some style guides for Go say to only use singular package names (stringutil), not plural (stringutils). Not sure if we should care that much, especially since theres packages like "errors" and "strings" that deviate from this. Just throwing that out there.
… about expectations