0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-23 15:53:07 -05:00

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

This commit is contained in:
Gusted 2021-12-26 14:56:14 +00:00 committed by GitHub
parent 4da2eabd7f
commit a2afd38f25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

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

View file

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