Skip to content

Commit 869435e

Browse files
moulismael FALLDoozers
authored
chore: regen (#636)
* chore: regen Signed-off-by: Manfred Touron <[email protected]> * chore: remove bearer Signed-off-by: Manfred Touron <[email protected]> * fix: remove usage of io/ioutil Signed-off-by: ismael FALL <[email protected]> * fix: version of golangci Signed-off-by: ismael FALL <[email protected]> * fix: gci file Signed-off-by: ismael FALL <[email protected]> * fix: go version CI Signed-off-by: ismael FALL <[email protected]> * fix: remove deprecated rule Signed-off-by: ismael FALL <[email protected]> * chore: go1.20 when possible --------- Signed-off-by: Manfred Touron <[email protected]> Signed-off-by: ismael FALL <[email protected]> Co-authored-by: ismael FALL <[email protected]> Co-authored-by: Isma <[email protected]>
1 parent fa5443c commit 869435e

File tree

15 files changed

+44
-74
lines changed

15 files changed

+44
-74
lines changed

.github/workflows/go.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
goreleaser-dryrun:
3030
strategy:
3131
matrix:
32-
golang: [1.18.x]
32+
golang: [1.20.x]
3333
runs-on: ubuntu-latest
3434
steps:
3535
- name: Checkout
@@ -59,7 +59,7 @@ jobs:
5959
steps:
6060
- uses: actions/[email protected]
6161
- name: golangci-lint
62-
uses: golangci/golangci-lint-action@v2.5.2
62+
uses: golangci/golangci-lint-action@v3.4.0
6363
with:
6464
version: ${{ matrix.golangci_lint }}
6565
#github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -71,7 +71,7 @@ jobs:
7171
runs-on: windows-latest
7272
strategy:
7373
matrix:
74-
golang: [1.18.x]
74+
golang: [1.20.x]
7575
steps:
7676
- uses: actions/[email protected]
7777
- name: Install Go
@@ -86,7 +86,7 @@ jobs:
8686
runs-on: macos-latest
8787
strategy:
8888
matrix:
89-
golang: [1.18.x]
89+
golang: [1.20.x]
9090
env:
9191
OS: macos-latest
9292
GOLANG: ${{ matrix.golang }}
@@ -125,8 +125,8 @@ jobs:
125125
strategy:
126126
matrix:
127127
golang:
128-
- 1.17.x
129-
- 1.18.x
128+
- 1.19.x
129+
- 1.20.x
130130
env:
131131
OS: ubuntu-latest
132132
GOLANG: ${{ matrix.golang }}

.github/workflows/pr.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,3 @@ jobs:
3838
# github_token: ${{ github.token }}
3939
# reporter: github-pr-review
4040
# locale: "US"
41-
- name: alexjs
42-
uses: theashraf/alex-action@master

cmd/depviz/depaware.txt

Lines changed: 18 additions & 17 deletions
Large diffs are not rendered by default.

cmd/depviz/main.go

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"os/signal"
1212
"time"
1313

14-
bearer "github.com/Bearer/bearer-go"
1514
"github.com/cayleygraph/cayley"
1615
"github.com/cayleygraph/cayley/graph"
1716
_ "github.com/cayleygraph/cayley/graph/kv/bolt"
@@ -33,11 +32,10 @@ var (
3332
logger *zap.Logger
3433
schemaConfig *schema.Config
3534

36-
globalFlags = flag.NewFlagSet("depviz", flag.ExitOnError)
37-
globalStorePath = globalFlags.String("store-path", os.Getenv("HOME")+"/.depviz", "store path")
38-
globalDebug = globalFlags.Bool("debug", false, "debug mode")
39-
globalWithStacktrace = globalFlags.Bool("with-stacktrace", false, "show stacktrace on warns, errors and worse")
40-
globalBearerSecretKey = globalFlags.String("bearer-secretkey", "", "optional bearer.sh secret key")
35+
globalFlags = flag.NewFlagSet("depviz", flag.ExitOnError)
36+
globalStorePath = globalFlags.String("store-path", os.Getenv("HOME")+"/.depviz", "store path")
37+
globalDebug = globalFlags.Bool("debug", false, "debug mode")
38+
globalWithStacktrace = globalFlags.Bool("with-stacktrace", false, "show stacktrace on warns, errors and worse")
4139

4240
airtableFlags = flag.NewFlagSet("airtable", flag.ExitOnError)
4341
airtableToken = airtableFlags.String("token", "", "airtable token")
@@ -145,10 +143,6 @@ func Main(args []string) error {
145143
func globalPreRun() error {
146144
rand.Seed(srand.MustSecure())
147145

148-
if *globalBearerSecretKey != "" {
149-
bearer.ReplaceGlobals(bearer.Init(*globalBearerSecretKey))
150-
}
151-
152146
config := zapconfig.Configurator{}
153147
if *globalDebug {
154148
config.SetLevel(zap.DebugLevel)

gen.sum

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go.mod

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go.sum

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/dvcore/run_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package dvcore
22

33
import (
44
"bytes"
5-
"io/ioutil"
65
"os"
76
"testing"
87

@@ -82,11 +81,11 @@ func TestPullAndSave(t *testing.T) {
8281
gp := dvstore.TestingGoldenDumpPath(t, test.name)
8382
if testutil.UpdateGolden() {
8483
t.Logf("update golden file: %s", gp)
85-
err := ioutil.WriteFile(gp, b.Bytes(), 0644)
84+
err := os.WriteFile(gp, b.Bytes(), 0644)
8685
assert.NoError(t, err, test.name)
8786
}
8887

89-
g, err := ioutil.ReadFile(gp)
88+
g, err := os.ReadFile(gp)
9089
assert.NoError(t, err, test.name)
9190
assert.Equal(t, string(g), b.String())
9291
}

internal/dvmodel/dvmodel.pb.go

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/dvserver/api.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"context"
66
"encoding/base64"
77
"fmt"
8-
"io/ioutil"
8+
"io"
99
"net/http"
1010

1111
"go.uber.org/zap"
@@ -24,7 +24,7 @@ func gitHubOAuth(opts Opts, httpLogger *zap.Logger) http.HandlerFunc {
2424
return
2525
}
2626

27-
code, err := ioutil.ReadAll(r.Body)
27+
code, err := io.ReadAll(r.Body)
2828
if err != nil {
2929
httpLogger.Error("get body", zap.Error(err))
3030
http.Error(w, "failed to retrieve body", http.StatusInternalServerError)
@@ -63,7 +63,7 @@ func gitHubOAuth(opts Opts, httpLogger *zap.Logger) http.HandlerFunc {
6363

6464
defer gitHubResponse.Body.Close()
6565

66-
token, err := ioutil.ReadAll(gitHubResponse.Body)
66+
token, err := io.ReadAll(gitHubResponse.Body)
6767
if err != nil {
6868
httpLogger.Error("get body", zap.Error(err))
6969
http.Error(w, "internal server error", http.StatusInternalServerError)

0 commit comments

Comments
 (0)