mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-30 19:08:37 +00:00 
			
		
		
		
	Enable linter [rule.modifies-value-receiver] and refactor RoleDescriptor (#18093)
This commit is contained in:
		| @@ -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] | ||||||
|   | |||||||
| @@ -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 { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user