mirror of
https://github.com/foomo/contentserver.git
synced 2025-10-16 12:25:44 +00:00
using fmt.Errorf(...) instead of errors.New(fmt.Sprintf(...))
This commit is contained in:
parent
a267dbe1ec
commit
d2e0af8aca
@ -1,14 +1,14 @@
|
|||||||
package repo
|
package repo
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
"errors"
|
|
||||||
"fmt"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const historyRepoJSONPrefix = "contentserver-repo-"
|
const historyRepoJSONPrefix = "contentserver-repo-"
|
||||||
@ -63,7 +63,7 @@ func (h *history) cleanup() error {
|
|||||||
for _, f := range files {
|
for _, f := range files {
|
||||||
err := os.Remove(f)
|
err := os.Remove(f)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.New(fmt.Sprintf("could not remove file %s : %s", f, err.Error()))
|
return fmt.Errorf("could not remove file %s : %s", f, err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user