Skip to content

Commit

Permalink
Fixing lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
samlown committed Dec 19, 2023
1 parent e76cdfe commit 9d11200
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tax/ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,14 @@ func (em ExtMap) Equals(other ExtMap) bool {
return true
}

// ExtMapHas returns a validation rule that ensures the extension map contains
// the provided keys.
// ExtMapHas returns a validation rule that ensures the extension map's
// keys match those provided.
func ExtMapHas(keys ...cbc.Key) validation.Rule {
return validateCodeMap{keys: keys}
}

// ExtMapRequires returns a validation rule that ensures all the
// extension map's keys match those provided in the list.
func ExtMapRequires(keys ...cbc.Key) validation.Rule {
return validateCodeMap{
required: true,
Expand All @@ -77,7 +79,7 @@ func (v validateCodeMap) Validate(value interface{}) error {
return nil
}
err := make(validation.Errors)
for k, _ := range em {
for k := range em {
if !k.In(v.keys...) {
err[k.String()] = errors.New("invalid")
}
Expand Down

0 comments on commit 9d11200

Please sign in to comment.