replace some basic uses of fmt.Sprintf()

Really tiny gains here, and doesn't significantly impact readability:

    BenchmarkSprintf
    BenchmarkSprintf-10    11528700     91.59 ns/op   32 B/op  1 allocs/op
    BenchmarkConcat
    BenchmarkConcat-10    100000000     11.76 ns/op    0 B/op  0 allocs/op

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2023-06-10 13:24:43 +02:00
parent ee2c8b79bf
commit 577696f608
8 changed files with 10 additions and 10 deletions

View File

@@ -177,7 +177,7 @@ func TestContainerStart(t *testing.T) {
}
func readShimPath(taskID string) (string, error) {
runtime := fmt.Sprintf("%s.%s", plugin.RuntimePluginV2, "task")
runtime := plugin.RuntimePluginV2.String() + ".task"
shimBinaryNamePath := filepath.Join(defaultState, runtime, testNamespace, taskID, "shim-binary-path")
shimPath, err := os.ReadFile(shimBinaryNamePath)