Skip to content

Commit

Permalink
Squashme: Fixes to pass linting test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kayssar Daher committed Nov 9, 2021
1 parent a624d48 commit 2da59f5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions postgresql/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,7 @@ func setToPgIdentList(schema string, idents *schema.Set) string {
func setToPgIdentSimpleList(idents *schema.Set) string {
quotedIdents := make([]string, idents.Len())
for i, ident := range idents.List() {
quotedIdents[i] = fmt.Sprintf(
"%s",
ident.(string),
)
quotedIdents[i] = ident.(string)
}
return strings.Join(quotedIdents, ",")
}
Expand Down
2 changes: 1 addition & 1 deletion postgresql/resource_postgresql_grant.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ func createRevokeQuery(d *schema.ResourceData) string {

if privileges.Len() == 0 || columns.Len() == 0 {
// No privileges to revoke, so don't revoke anything
query = fmt.Sprintf("SELECT NULL")
query = "SELECT NULL"
} else {
query = fmt.Sprintf(
"REVOKE %s (%s) ON TABLE %s FROM %s",
Expand Down
2 changes: 1 addition & 1 deletion postgresql/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ func testCheckColumnPrivileges(t *testing.T, dbName, roleName string, tables []s
}

updateColumnValues := []string{}
for i, _ := range columns {
for i := range columns {
updateColumnValues = append(updateColumnValues, fmt.Sprint(columns[i], " = ", columnValues[i]))
}

Expand Down

0 comments on commit 2da59f5

Please sign in to comment.