Apply go fix modernizations
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package main
|
||||
|
||||
import "strings"
|
||||
|
||||
import "fmt"
|
||||
|
||||
type Show struct {
|
||||
@@ -30,11 +32,12 @@ type Trigger struct {
|
||||
}
|
||||
|
||||
func (t *Trigger) String() string {
|
||||
s := fmt.Sprintf("%s/%s ->", t.Source.Block, t.Source.Signal)
|
||||
var s strings.Builder
|
||||
s.WriteString(fmt.Sprintf("%s/%s ->", t.Source.Block, t.Source.Signal))
|
||||
for _, target := range t.Targets {
|
||||
s += fmt.Sprintf(" %s/%s", target.Block, target.Hook)
|
||||
s.WriteString(fmt.Sprintf(" %s/%s", target.Block, target.Hook))
|
||||
}
|
||||
return s
|
||||
return s.String()
|
||||
}
|
||||
|
||||
type TriggerSource struct {
|
||||
|
||||
Reference in New Issue
Block a user