if you're going to "parse, don't validate" then the signature should probably be
func validateUser(user UnvalidatedUser) (error, User)
this way, you can't accidentally forget to validate your user before using it in the rest of your code
func validateUser(user UnvalidatedUser) (error, User)
this way, you can't accidentally forget to validate your user before using it in the rest of your code
Further, if you want to validate that your X is barlike, all you have to do now is make sure you have some function f : Y -> Z. If you want to scrutinize your validation logic, then you need only look at all functions of that specific type in your program.
Admittedly, go is probably not a language with the best support for these kinds of constructs.