Skip to content

Commit

Permalink
fix: remove deprecated packages
Browse files Browse the repository at this point in the history
  • Loading branch information
wowu committed Nov 13, 2024
1 parent 25c90bd commit bf51711
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 20 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions provider/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"io"
"net/http"
"net/url"
"strings"
Expand Down Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions provider/gitlab/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gitlab
import (
"encoding/json"
"errors"
"io/ioutil"
"io"
"net/http"
"net/url"
)
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit bf51711

Please sign in to comment.