Skip to content

Commit

Permalink
lxd/db/cluster/open_test: avoid fmt.Sprintf (slow)
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Deziel <[email protected]>
  • Loading branch information
simondeziel committed Jan 21, 2025
1 parent a90ea4e commit eba9ab3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lxd/db/cluster/open_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func addNode(t *testing.T, db *sql.DB, address string, schema int, apiExtensions
stmt := `
INSERT INTO nodes(name, address, schema, api_extensions, arch, description) VALUES (?, ?, ?, ?, ?, '')
`
name := fmt.Sprintf("node at %s", address)
name := "node at " + address
_, err := tx.Exec(stmt, name, address, schema, apiExtensions, osarch.ARCH_64BIT_INTEL_X86)
return err
})
Expand Down

0 comments on commit eba9ab3

Please sign in to comment.