mirror of
https://github.com/restic/restic.git
synced 2026-11-22 05:14:23 +00:00
errcheck: More error handling
This commit is contained in:
1 parent
16313bfcc9
commit
3c753c071c
5 files changed
+32
-12
No files matched your search
@@ -79,7 +79,10 @@ func NewBackup(term *termstatus.Terminal, verbosity uint) *Backup {
|
||||
|
||||
func toJSONString(status interface{}) string {
|
||||
buf := new(bytes.Buffer)
|
||||
json.NewEncoder(buf).Encode(status)
|
||||
err := json.NewEncoder(buf).Encode(status)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return buf.String()
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user