grafana-backuper/pkg/grafanabackuper/message.go

23 lines
327 B
Go
Raw Permalink Normal View History

package grafanabackuper
import (
"fmt"
)
type Message struct {
ID uint
Path string
Title string
UID string
}
func (m Message) String() string {
commitMsg := fmt.Sprintf("%s: Update %s to version %d", m.Path, m.UID, m.ID)
if m.Title != "" {
commitMsg += fmt.Sprintf(" => %s", m.Title)
}
return commitMsg
}