You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This likely overlaps with the goal described in #1774, but this issue is intended to track a lower-level list of specific types. Each of these types must have tests in place to ensure the "zero value" is usable in the way it is documented. This may require softening the rule in some places, but I'd like such places to be accompanied with documentation and good examples of happy path usage. The critical parts of what I mean by "usable" are:
None of the functions with the struct as receiver or argument panic
None of the templates that use the struct panic or otherwise result in an error
I do not expect arbitrary, undocumented, or otherwise unsupervised usage of a "zero value" struct to fulfill these requirements. The primary way I expect the above definition of "usable" to be implemented is via private methods that ensure all fields are minimally initialized such as *Command.setupDefaults.
Ensure Command type is usable as "zero value"
Ensure ValueSourceChain type is usable as "zero value"
Ensure MutuallyExclusiveFlags type is usable as "zero value"
Ensure BoolWithInverseFlag type is usable as "zero value"
(more TODO)
The text was updated successfully, but these errors were encountered:
@meatballhat How do you imagine e.g. a zero-valued Command to work? I mean, at least a name is required so it will display correctly in "help" and will be triggered.
This likely overlaps with the goal described in #1774, but this issue is intended to track a lower-level list of specific types. Each of these types must have tests in place to ensure the "zero value" is usable in the way it is documented. This may require softening the rule in some places, but I'd like such places to be accompanied with documentation and good examples of happy path usage. The critical parts of what I mean by "usable" are:
panic
panic
or otherwise result in an errorI do not expect arbitrary, undocumented, or otherwise unsupervised usage of a "zero value" struct to fulfill these requirements. The primary way I expect the above definition of "usable" to be implemented is via private methods that ensure all fields are minimally initialized such as
*Command.setupDefaults
.Command
type is usable as "zero value"ValueSourceChain
type is usable as "zero value"MutuallyExclusiveFlags
type is usable as "zero value"BoolWithInverseFlag
type is usable as "zero value"The text was updated successfully, but these errors were encountered: