@@ -14,8 +14,10 @@ import "github.com/joncrlsn/pgutil"
1414import "github.com/joncrlsn/misc"
1515
1616// ==================================
17- // GrantRelationshipRows definition (an array of string maps)
17+ // GrantRelationshipRows definition
1818// ==================================
19+
20+ // GrantRelationshipRows is a sortable slice of string maps
1921type GrantRelationshipRows []map [string ]string
2022
2123func (slice GrantRelationshipRows ) Len () int {
@@ -133,7 +135,7 @@ func (c *GrantRelationshipSchema) Change(obj interface{}) {
133135
134136 // Find grants in the first db that are not in the second
135137 // (for this relationship and owner)
136- grantList := make ( []string , 0 )
138+ var grantList []string
137139 for _ , g := range grants1 {
138140 if ! misc .ContainsString (grants2 , g ) {
139141 grantList = append (grantList , g )
@@ -145,7 +147,7 @@ func (c *GrantRelationshipSchema) Change(obj interface{}) {
145147
146148 // Find grants in the second db that are not in the first
147149 // (for this relationship and owner)
148- revokeList := make ( []string , 0 )
150+ var revokeList []string
149151 for _ , g := range grants2 {
150152 if ! misc .ContainsString (grants1 , g ) {
151153 revokeList = append (revokeList , g )
0 commit comments