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:
@@ -177,7 +177,7 @@ type ShimManager struct {
|
||||
|
||||
// ID of the shim manager
|
||||
func (m *ShimManager) ID() string {
|
||||
return fmt.Sprintf("%s.%s", plugin.RuntimePluginV2, "shim")
|
||||
return plugin.RuntimePluginV2.String() + ".shim"
|
||||
}
|
||||
|
||||
// Start launches a new shim instance
|
||||
@@ -413,7 +413,7 @@ func NewTaskManager(shims *ShimManager) *TaskManager {
|
||||
|
||||
// ID of the task manager
|
||||
func (m *TaskManager) ID() string {
|
||||
return fmt.Sprintf("%s.%s", plugin.RuntimePluginV2, "task")
|
||||
return plugin.RuntimePluginV2.String() + ".task"
|
||||
}
|
||||
|
||||
// Create launches new shim instance and creates new task
|
||||
|
||||
Reference in New Issue
Block a user