refactroing part 2

This commit is contained in:
Felix Kunde
2021-02-09 15:39:34 +01:00
parent 27ec82bd85
commit b261f6b8c0
4 changed files with 5 additions and 13 deletions
+2 -5
View File
@@ -8,8 +8,6 @@ import (
// PostgresTeamMap is the operator's internal representation of all PostgresTeam CRDs
type PostgresTeamMap map[string]*postgresTeamMembership
var emptyTeamMap = make(PostgresTeamMap, 0)
type postgresTeamMembership struct {
AdditionalSuperuserTeams []string
AdditionalTeams []string
@@ -96,9 +94,8 @@ func (ptm *PostgresTeamMap) GetAdditionalSuperuserTeams(team string, transitive
// Load function to import data from PostgresTeam CRD
func (ptm *PostgresTeamMap) Load(pgTeams *acidv1.PostgresTeamList) {
if ptm == nil {
ptm = &emptyTeamMap
}
var emptyTeamMap = make(PostgresTeamMap, 0)
*ptm = emptyTeamMap
superuserTeamSet := teamHashSet{}
teamSet := teamHashSet{}