Commit febe5f53 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

Merge branch 'fix-go-lint' into 'master'

fix: deprecated ioutil

See merge request to-be-continuous/tools/vault-secrets-provider!38
parents 5c12950f 321d99e7
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ import (
	"errors"
	"fmt"
	"io"
	"io/ioutil"
	"log"
	"net/http"
	"os"
@@ -616,7 +615,7 @@ func getObj(obj map[string]interface{}, keyPath string) (string, error) {
 * Check json format into request body
 */
func checkBody(request *http.Request) (int, []byte, error) {
	bodyStr, _ := ioutil.ReadAll(request.Body)
	bodyStr, _ := io.ReadAll(request.Body)
	if len(bodyStr) <= 0 {
		return http.StatusBadRequest, nil, fmt.Errorf("request body must not be empty")
	}