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
all: mention associated factory method for msgFieldInclusion #303
Conversation
This should help users avoid errors by using the factory methods rather than the plain structs.
8e1cffe
to
9bf4a64
Compare
All updated! |
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.
Generating error messages that may lead the user to solve what went wrong! Crazy! ;-)
This is really nice Adam!
Adam, Did you do this for all msgFieldInclusion already? Wondering if adding %v (%s) to msgFieldInclusion and pass in the type so something like:
Just banter... not critical In other words this applies to all types that return msgfieldInclusion not just addenda types. For example:
|
It's in FileHeader also, func (fh *FileHeader) fieldInclusion() error { We may want to consider removing the "and has a default value", as it has evolved to returning an error for fields that are mandatory. Some still have a default value (recordType). I didn't think that this was critical path, that we could work on in another version, but with the API, it would bump up in priority. |
I see you did do the others besides Addenda*. nice, so yeah its all good, We still may want to consider removing "and has a default value". For the alternative solution we would have to check e.FieldName |
I thought about adding a |
it's good as is. Thinking out loud... |
This seems useful for people. If y'all think so too I'll do the whole project.