1 parent b570b77 commit 6ecea75Copy full SHA for 6ecea75
1 file changed
chardet/chardet.gogs.go
@@ -9,7 +9,7 @@ import (
9
func DetectEncodingByGogsChardet(dat []byte) (string, error) {
10
v, err := chardet.NewTextDetector().DetectBest(dat)
11
if err != nil {
12
- return "", fmt.Errorf("detect failed by github.com/wlynxg/chardet: %s", err)
+ return "", fmt.Errorf("detect failed by github.com/wlynxg/chardet: %w", err)
13
}
14
return v.Charset, nil
15
0 commit comments