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:
@@ -130,7 +130,7 @@ func (r *Registration) Init(ic *InitContext) *Plugin {
|
||||
|
||||
// URI returns the full plugin URI
|
||||
func (r *Registration) URI() string {
|
||||
return fmt.Sprintf("%s.%s", r.Type, r.ID)
|
||||
return r.Type.String() + "." + r.ID
|
||||
}
|
||||
|
||||
var register = struct {
|
||||
|
||||
Reference in New Issue
Block a user