Skip to content

Commit

Permalink
Fix missed fmt.Sprintf, whitespace agreement
Browse files Browse the repository at this point in the history
  • Loading branch information
jnielsendotnet committed Apr 24, 2024
1 parent 5299736 commit d4ca838
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/backend/remote-state/pg/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (c *RemoteClient) Lock(info *statemgr.LockInfo) (string, error) {
}

// Try to acquire locks for the existing row `id` and the creation lock.
creation_lock := c.SchemaName + "_create"
creation_lock := fmt.Sprintf("%s_create", c.SchemaName)
query := `SELECT %s.id, pg_try_advisory_lock(%s.id), pg_try_advisory_lock(%s) FROM %s.%s WHERE %s.name = $1`
row := c.Client.QueryRow(fmt.Sprintf(query, statesTableName, statesTableName, creation_lock, c.SchemaName, statesTableName, statesTableName), c.Name)
var pgLockId, didLock, didLockForCreate []byte
Expand Down

0 comments on commit d4ca838

Please sign in to comment.