Use fmt.Errorf
This commit is contained in:
parent
45069d4fbb
commit
adb424ea03
11 changed files with 50 additions and 60 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue