From bf51711bb0db0b6187d485db2f655b8d4d6f9625 Mon Sep 17 00:00:00 2001 From: Karol Musur Date: Wed, 13 Nov 2024 14:38:44 +0100 Subject: [PATCH] fix: remove deprecated packages --- .github/workflows/build.yml | 8 -------- .github/workflows/lint.yml | 8 -------- provider/github/github.go | 4 ++-- provider/gitlab/gitlab.go | 4 ++-- 4 files changed, 4 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9383d70..90c9a55 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,17 +4,9 @@ on: push: branches: - main - paths: - - "**.go" - - go.mod - - go.sum pull_request: branches: - main - paths: - - "**.go" - - go.mod - - go.sum jobs: build: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 190949e..0912bec 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,17 +4,9 @@ on: push: branches: - main - paths: - - "**.go" - - go.mod - - go.sum pull_request: branches: - main - paths: - - "**.go" - - go.mod - - go.sum permissions: contents: read diff --git a/provider/github/github.go b/provider/github/github.go index 7082ed4..aae1416 100644 --- a/provider/github/github.go +++ b/provider/github/github.go @@ -4,7 +4,7 @@ import ( "encoding/json" "errors" "fmt" - "io/ioutil" + "io" "net/http" "net/url" "strings" @@ -32,7 +32,7 @@ func apiGet(url string, token string) (ApiResponse, error) { return ApiResponse{}, err } - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) if err != nil { return ApiResponse{}, err } diff --git a/provider/gitlab/gitlab.go b/provider/gitlab/gitlab.go index ad3577f..7b42576 100644 --- a/provider/gitlab/gitlab.go +++ b/provider/gitlab/gitlab.go @@ -3,7 +3,7 @@ package gitlab import ( "encoding/json" "errors" - "io/ioutil" + "io" "net/http" "net/url" ) @@ -32,7 +32,7 @@ func apiGet(url string, token string) (ApiResponse, error) { return ApiResponse{}, err } - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) if err != nil { return ApiResponse{}, err }