TailMsgf must format with args

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2023-04-19 10:21:35 +02:00 committed by Nicolas De loof
parent e606701d9f
commit 07c4849cb9
1 changed files with 4 additions and 4 deletions

View File

@ -53,12 +53,12 @@ func (p *plainWriter) Events(events []Event) {
}
}
func (p *plainWriter) TailMsgf(m string, args ...interface{}) {
prefix := ""
func (p *plainWriter) TailMsgf(msg string, args ...interface{}) {
msg = fmt.Sprintf(msg, args...)
if p.dryRun {
prefix = api.DRYRUN_PREFIX
msg = api.DRYRUN_PREFIX + msg
}
fmt.Fprintln(p.out, append([]interface{}{prefix, m}, args...)...)
fmt.Fprintln(p.out, msg)
}
func (p *plainWriter) Stop() {