I found this git repo with go patterns:
For example this, does not allow that evaluating the given argument results in an error:
func UID(userID int) Option {
return func(args *Options) {
args.UID = userID
}
}
Wouldn’t it be better, if Options would be defined like this?
type Option func(*Options) error