Przeglądaj źródła

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

tags/v1.16.0-rc1
Gusted 2 lat temu
rodzic
commit
a2afd38f25
No account linked to committer's email address
2 zmienionych plików z 2 dodań i 2 usunięć
  1. 1
    0
      .revive.toml
  2. 1
    2
      models/issue_comment.go

+ 1
- 0
.revive.toml Wyświetl plik

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

+ 1
- 2
models/issue_comment.go Wyświetl plik

@@ -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 {

Ładowanie…
Anuluj
Zapisz