Преглед изворни кода

security: fix var shadowing in CreateOrUpdate

Yicheng Qin пре 11 година
родитељ
комит
d7780cf293
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      etcdserver/security/security.go

+ 1 - 1
etcdserver/security/security.go

@@ -197,7 +197,7 @@ func (s *Store) GetRole(name string) (Role, error) {
 }
 
 func (s *Store) CreateOrUpdateRole(role Role) (Role, error) {
-	role, err := s.GetRole(role.Role)
+	_, err := s.GetRole(role.Role)
 	if err == nil {
 		return s.UpdateRole(role)
 	}