@@ -14,8 +14,10 @@ import "github.com/joncrlsn/pgutil"
14
14
import "github.com/joncrlsn/misc"
15
15
16
16
// ==================================
17
- // GrantRelationshipRows definition (an array of string maps)
17
+ // GrantRelationshipRows definition
18
18
// ==================================
19
+
20
+ // GrantRelationshipRows is a sortable slice of string maps
19
21
type GrantRelationshipRows []map [string ]string
20
22
21
23
func (slice GrantRelationshipRows ) Len () int {
@@ -133,7 +135,7 @@ func (c *GrantRelationshipSchema) Change(obj interface{}) {
133
135
134
136
// Find grants in the first db that are not in the second
135
137
// (for this relationship and owner)
136
- grantList := make ( []string , 0 )
138
+ var grantList []string
137
139
for _ , g := range grants1 {
138
140
if ! misc .ContainsString (grants2 , g ) {
139
141
grantList = append (grantList , g )
@@ -145,7 +147,7 @@ func (c *GrantRelationshipSchema) Change(obj interface{}) {
145
147
146
148
// Find grants in the second db that are not in the first
147
149
// (for this relationship and owner)
148
- revokeList := make ( []string , 0 )
150
+ var revokeList []string
149
151
for _ , g := range grants2 {
150
152
if ! misc .ContainsString (grants1 , g ) {
151
153
revokeList = append (revokeList , g )
0 commit comments