Enable linter [rule.modifies-value-receiver] and refactor RoleDescriptor (#18093)

tokarchuk/v1.17
Gusted 3 years ago committed by GitHub
parent 4da2eabd7f
commit a2afd38f25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .revive.toml
  2. 3
      models/issue_comment.go

@ -24,3 +24,4 @@ warningCode = 1
[rule.indent-error-flow]
[rule.errorf]
[rule.duplicated-imports]
[rule.modifies-value-receiver]

@ -123,8 +123,7 @@ const (
// WithRole enable a specific tag on the RoleDescriptor.
func (rd RoleDescriptor) WithRole(role RoleDescriptor) RoleDescriptor {
rd |= (1 << role)
return rd
return rd | (1 << role)
}
func stringToRoleDescriptor(role string) RoleDescriptor {

Loading…
Cancel
Save