Use fmt.Errorf

This commit is contained in:
nemunaire 2020-04-15 07:39:38 +02:00
parent 45069d4fbb
commit adb424ea03
11 changed files with 50 additions and 60 deletions

View file

@ -4,7 +4,6 @@ import (
"bufio"
"crypto"
"encoding/hex"
"errors"
"fmt"
"io"
"os"
@ -150,12 +149,12 @@ func ApiGetRemoteExerciceHints(ps httprouter.Params, _ []byte) (interface{}, err
if hints != nil {
return hints, nil
} else {
return hints, errors.New(fmt.Sprintf("%q", errs))
return hints, fmt.Errorf("%q", errs)
}
} else {
return exercice, errors.New(fmt.Sprintf("%q", errs))
return exercice, fmt.Errorf("%q", errs)
}
} else {
return nil, errors.New(fmt.Sprintf("%q", errs))
return nil, fmt.Errorf("%q", errs)
}
}