go fmt run

This commit is contained in:
Oleksii Kliukin 2017-11-06 13:07:09 +01:00
parent 71f57c9fe3
commit 2352fc9a39
4 changed files with 32 additions and 32 deletions

View File

@ -173,7 +173,7 @@ func produceAlterStmt(user spec.PgUser) string {
func produceAlterRoleSetStmts(user spec.PgUser) []string {
result := make([]string, 0)
result = append(result, fmt.Sprintf(alterRoleResetAllSQL, user.Name))
for key, value := range(user.Parameters) {
for key, value := range user.Parameters {
result = append(result, fmt.Sprintf(alterRoleSetSQL, user.Name, key, quoteValue(value)))
}
return result
@ -198,5 +198,5 @@ func quoteValue(val string) string {
(strings.HasPrefix(val, `'`) && strings.HasSuffix(val, `'`)) {
return val
}
return fmt.Sprintf(`"%s"`, strings.Trim(val," "))
return fmt.Sprintf(`"%s"`, strings.Trim(val, " "))
}