mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
avoiding unnecessary type conversions
This commit is contained in:
parent
8b22fe29cf
commit
76d1866444
@ -129,7 +129,7 @@ func (t *Table) Write(w io.Writer) error {
|
||||
return err
|
||||
}
|
||||
|
||||
row = append(row, string(buf.Bytes()))
|
||||
row = append(row, buf.String())
|
||||
buf.Reset()
|
||||
}
|
||||
lines = append(lines, row)
|
||||
|
@ -154,7 +154,7 @@ foo 2018-08-19 22:22:22 xxx other /home/user/other
|
||||
}
|
||||
|
||||
want := strings.TrimLeft(test.output, "\n")
|
||||
if string(buf.Bytes()) != want {
|
||||
if buf.String() != want {
|
||||
t.Errorf("wrong output\n---- want ---\n%s\n---- got ---\n%s\n-------\n", want, buf.Bytes())
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user