refactor(errors): name keep-state errors after dynamic state - #112
Merged
Merged
Conversation
ErrStateOptionInGroup and ErrDuplicateStateOption said State for the dynamic state keep-state creates, next to ErrState and the State interface, which mean a callback. They become ErrDynamicStateInGroup and ErrDuplicateDynamicState, the ipfw(8) term, which also covers record-state, limit and set-limit, the options FreeBSD holds to the same rules. The messages follow. Neither name was released in v0.1.0.
…rror-names # Conflicts: # errors.go # errors_test.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ErrStateOptionInGroupandErrDuplicateStateOptionsaid State for the dynamic statekeep-statecreates, right next toErrStateand theStateinterface, where the word means a callback. They becomeErrDynamicStateInGroupandErrDuplicateDynamicState, with the messages following ("dynamic state option in OR block", "more than one dynamic state option").The name follows ipfw(8), which speaks of dynamic rules and states, and FreeBSD, whose
ipfw2.choldskeep-state,record-state,limitandset-limitto the same two rules ("only one of keep-state, record-state, limit and set-limit is allowed"). Today onlykeep-stateis checked, and the names stay right when the others arrive.Found by the pre-release API audit for v0.2.0.
Compatibility
Neither name was released in v0.1.0. The order and the numeric values of the constants are unchanged.
Validation
make testandmake lintpass.