diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index cfbc062..029e9cb 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -7,10 +7,10 @@ jobs: runs-on: ubuntu-latest steps: - - name: Set up Go 1.15 + - name: Set up Go 1.17 uses: actions/setup-go@v1 with: - go-version: 1.15 + go-version: 1.17 id: go - name: Check out code into the Go module directory diff --git a/main.go b/main.go index 047c1f8..38493a4 100644 --- a/main.go +++ b/main.go @@ -4,7 +4,7 @@ import ( "bytes" "encoding/json" "fmt" - "io" + "io/ioutil" "log" "net/http" "os" @@ -102,7 +102,7 @@ func LinkpreviewProxyHandler(w http.ResponseWriter, r *http.Request) { defer resp.Body.Close() cr := CachedResponse{} - cr.Body, err = io.ReadAll(resp.Body) + cr.Body, err = ioutil.ReadAll(resp.Body) cr.Status = resp.StatusCode if err != nil { http.Error(w, "Server Error", http.StatusInternalServerError)