Skip to content

Commit aeeecd7

Browse files
committed
Enable dependabot
* Enable dependabot on the various packages. * Update Go modules. * Update CI Go versions. * Update bingo. * Update golangci-lint. * Update copyright package to remove deprecated errors package. Signed-off-by: SuperQ <[email protected]>
1 parent 6b73929 commit aeeecd7

File tree

17 files changed

+152
-77
lines changed

17 files changed

+152
-77
lines changed

.bingo/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# But not these files:
66
!.gitignore
77
!*.mod
8+
!*.sum
89
!README.md
910
!Variables.mk
1011
!variables.env

.bingo/Variables.mk

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.4.2. DO NOT EDIT.
1+
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.8. DO NOT EDIT.
22
# All tools are designed to be build inside $GOBIN.
33
BINGO_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
44
GOPATH ?= $(shell go env GOPATH)
@@ -17,39 +17,39 @@ GO ?= $(shell which go)
1717
# @echo "Running bingo"
1818
# @$(BINGO) <flags/args..>
1919
#
20-
BINGO := $(GOBIN)/bingo-v0.2.4-0.20201227120526-df6eae8f6734
20+
BINGO := $(GOBIN)/bingo-v0.8.0
2121
$(BINGO): $(BINGO_DIR)/bingo.mod
2222
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
23-
@echo "(re)installing $(GOBIN)/bingo-v0.2.4-0.20201227120526-df6eae8f6734"
24-
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=bingo.mod -o=$(GOBIN)/bingo-v0.2.4-0.20201227120526-df6eae8f6734 "github.com/bwplotka/bingo"
23+
@echo "(re)installing $(GOBIN)/bingo-v0.8.0"
24+
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=bingo.mod -o=$(GOBIN)/bingo-v0.8.0 "github.com/bwplotka/bingo"
2525

26-
FAILLINT := $(GOBIN)/faillint-v1.5.0
26+
FAILLINT := $(GOBIN)/faillint-v1.11.0
2727
$(FAILLINT): $(BINGO_DIR)/faillint.mod
2828
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
29-
@echo "(re)installing $(GOBIN)/faillint-v1.5.0"
30-
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=faillint.mod -o=$(GOBIN)/faillint-v1.5.0 "github.com/fatih/faillint"
29+
@echo "(re)installing $(GOBIN)/faillint-v1.11.0"
30+
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=faillint.mod -o=$(GOBIN)/faillint-v1.11.0 "github.com/fatih/faillint"
3131

3232
GOIMPORTS := $(GOBIN)/goimports-v0.0.0-20200519204825-e64124511800
3333
$(GOIMPORTS): $(BINGO_DIR)/goimports.mod
3434
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
3535
@echo "(re)installing $(GOBIN)/goimports-v0.0.0-20200519204825-e64124511800"
36-
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=goimports.mod -o=$(GOBIN)/goimports-v0.0.0-20200519204825-e64124511800 "golang.org/x/tools/cmd/goimports"
36+
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=goimports.mod -o=$(GOBIN)/goimports-v0.0.0-20200519204825-e64124511800 "golang.org/x/tools/cmd/goimports"
3737

3838
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.26.0
3939
$(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
4040
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
4141
@echo "(re)installing $(GOBIN)/golangci-lint-v1.26.0"
42-
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.26.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"
42+
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.26.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"
4343

4444
MDOX := $(GOBIN)/mdox-v0.2.2-0.20210731105602-946757ef5f98
4545
$(MDOX): $(BINGO_DIR)/mdox.mod
4646
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
4747
@echo "(re)installing $(GOBIN)/mdox-v0.2.2-0.20210731105602-946757ef5f98"
48-
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=mdox.mod -o=$(GOBIN)/mdox-v0.2.2-0.20210731105602-946757ef5f98 "github.com/bwplotka/mdox"
48+
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=mdox.mod -o=$(GOBIN)/mdox-v0.2.2-0.20210731105602-946757ef5f98 "github.com/bwplotka/mdox"
4949

5050
MISSPELL := $(GOBIN)/misspell-v0.3.4
5151
$(MISSPELL): $(BINGO_DIR)/misspell.mod
5252
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
5353
@echo "(re)installing $(GOBIN)/misspell-v0.3.4"
54-
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=misspell.mod -o=$(GOBIN)/misspell-v0.3.4 "github.com/client9/misspell/cmd/misspell"
54+
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=misspell.mod -o=$(GOBIN)/misspell-v0.3.4 "github.com/client9/misspell/cmd/misspell"
5555

.bingo/bingo.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
22

33
go 1.15
44

5-
require github.com/bwplotka/bingo v0.2.4-0.20201227120526-df6eae8f6734
5+
require github.com/bwplotka/bingo v0.8.0

.bingo/bingo.sum

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww=
2+
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
3+
github.com/bwplotka/bingo v0.8.0 h1:Cx9eQb+ed9aU7sbrmZagomKx+wYor9y5z5HM91bvp1U=
4+
github.com/bwplotka/bingo v0.8.0/go.mod h1:eXPFwhZ92mmOUBk6F7aKcAJoq8HX88Ju3wLZKwtNKEw=
5+
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
6+
github.com/creack/pty v1.1.15/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
7+
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
8+
github.com/efficientgo/core v1.0.0-rc.0 h1:jJoA0N+C4/knWYVZ6GrdHOtDyrg8Y/TR4vFpTaqTsqs=
9+
github.com/efficientgo/core v1.0.0-rc.0/go.mod h1:kQa0V74HNYMfuJH6jiPiwNdpWXl4xd/K4tzlrcvYDQI=
10+
github.com/frankban/quicktest v1.13.1/go.mod h1:NeW+ay9A/U67EYXNFA1nPE8e/tnQv/09mUdL/ijj8og=
11+
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
12+
github.com/google/renameio v1.0.1/go.mod h1:t/HQoYBZSsWSNK35C6CO/TpPLDVWvxOHboWUAweKUpk=
13+
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
14+
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
15+
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
16+
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
17+
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
18+
github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA=
19+
github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU=
20+
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
21+
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
22+
github.com/rogpeppe/go-internal v1.8.1-0.20210923151022-86f73c517451/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o=
23+
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
24+
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
25+
golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38=
26+
golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
27+
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
28+
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
29+
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
30+
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
31+
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
32+
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
33+
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
34+
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
35+
golang.org/x/sys v0.0.0-20210925032602-92d5a993a665/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
36+
golang.org/x/sys v0.0.0-20220330033206-e17cdc41300f h1:rlezHXNlxYWvBCzNses9Dlc7nGFaNMJeqLolcmQSSZY=
37+
golang.org/x/sys v0.0.0-20220330033206-e17cdc41300f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
38+
golang.org/x/term v0.0.0-20210916214954-140adaaadfaf/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
39+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
40+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
41+
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
42+
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
43+
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
44+
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
45+
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
46+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
47+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
48+
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
49+
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
50+
mvdan.cc/editorconfig v0.2.0/go.mod h1:lvnnD3BNdBYkhq+B4uBuFFKatfp02eB6HixDvEz91C0=
51+
mvdan.cc/sh/v3 v3.4.3 h1:zbuKH7YH9cqU6PGajhFFXZY7dhPXcDr55iN/cUAqpuw=
52+
mvdan.cc/sh/v3 v3.4.3/go.mod h1:p/tqPPI4Epfk2rICAe2RoaNd8HBSJ8t9Y2DA9yQlbzY=

.bingo/faillint.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
22

3-
go 1.14
3+
go 1.20
44

5-
require github.com/fatih/faillint v1.5.0
5+
require github.com/fatih/faillint v1.11.0

.bingo/variables.env

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.4.2. DO NOT EDIT.
1+
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.8. DO NOT EDIT.
22
# All tools are designed to be build inside $GOBIN.
33
# Those variables will work only until 'bingo get' was invoked, or if tools were installed via Makefile's Variables.mk.
44
GOBIN=${GOBIN:=$(go env GOBIN)}
@@ -8,9 +8,9 @@ if [ -z "$GOBIN" ]; then
88
fi
99

1010

11-
BINGO="${GOBIN}/bingo-v0.2.4-0.20201227120526-df6eae8f6734"
11+
BINGO="${GOBIN}/bingo-v0.8.0"
1212

13-
FAILLINT="${GOBIN}/faillint-v1.5.0"
13+
FAILLINT="${GOBIN}/faillint-v1.11.0"
1414

1515
GOIMPORTS="${GOBIN}/goimports-v0.0.0-20200519204825-e64124511800"
1616

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "gomod"
4+
directory: "/copyright"
5+
schedule:
6+
interval: "monthly"
7+
- package-ecosystem: "gomod"
8+
directory: "/core"
9+
schedule:
10+
interval: "monthly"
11+
- package-ecosystem: "gomod"
12+
directory: "/extkingpin"
13+
schedule:
14+
interval: "monthly"
15+
- package-ecosystem: "gomod"
16+
directory: "/preformance"
17+
schedule:
18+
interval: "monthly"
19+

.github/workflows/go.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Install Go
1919
uses: actions/setup-go@v2
2020
with:
21-
go-version: 1.15.x
21+
go-version: 1.20.x
2222

2323
- uses: actions/cache@v1
2424
with:
@@ -34,7 +34,7 @@ jobs:
3434
strategy:
3535
fail-fast: false
3636
matrix:
37-
go: [ '1.14.x', '1.15.x']
37+
go: [ '1.19.x', '1.20.x']
3838
platform: [ubuntu-latest, macos-latest]
3939

4040
name: Unit tests on Go ${{ matrix.go }} ${{ matrix.platform }}
@@ -55,4 +55,4 @@ jobs:
5555
- name: Run unit tests.
5656
env:
5757
GOBIN: /tmp/.bin
58-
run: make test
58+
run: make test

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Set of lightweight tools, packages and modules that every open-source Go project always needs with almost no dependencies.
66

77
## NOTE: core module from this repository is now deprecated and move to standalone repo with higher compatibiltiy guarantees: https://github.com/efficientgo/core
8+
89
## Release model
910

1011
Since this is meant to be critical, tiny import, multi module toolset, there are currently no semver releases planned. It's designed to pin modules via git commits, all commits to master should be stable and properly tested, vetted and linted.

copyright/copyright.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ package main
55

66
import (
77
"bytes"
8+
"fmt"
89
"io"
910
"log"
1011
"os"
1112
"path/filepath"
1213
"strings"
1314

15+
"github.com/alecthomas/kingpin/v2"
1416
"github.com/efficientgo/tools/core/pkg/errcapture"
15-
"github.com/pkg/errors"
16-
"github.com/protoconfig/protoconfig/go/kingpinv2"
17-
"gopkg.in/alecthomas/kingpin.v2"
17+
"github.com/openproto/protoconfig/go/kingpinv2"
1818
)
1919

2020
type langSpec struct {
@@ -70,10 +70,10 @@ func (c *copyrightApplier) EnableVerbose() {
7070
}
7171

7272
// TODO(bwplotka): Make this concurrently.
73-
func (c *copyrightApplier) Apply(file string) (err error) {
73+
func (c *copyrightApplier) Apply(file string) error {
7474
spec, ok := specByExt[filepath.Ext(file)]
7575
if !ok {
76-
return errors.Errorf("unsupported file extension %v", filepath.Ext(file))
76+
return fmt.Errorf("unsupported file extension %v", filepath.Ext(file))
7777
}
7878

7979
if spec.isGenererated != nil {
@@ -110,12 +110,12 @@ func (c *copyrightApplier) Apply(file string) (err error) {
110110
if err != nil {
111111
return err
112112
}
113-
defer errcapture.Close(&err, f.Close, "close")
113+
defer errcapture.Do(&err, f.Close, "close")
114114

115115
hdr := make([]byte, len(cb))
116116
n, err := f.Read(hdr)
117117
if err != io.EOF && err != nil {
118-
return errors.Wrapf(err, "read first %v bytes", len(cb))
118+
return fmt.Errorf("read first %v bytes error: %w", len(cb), err)
119119
}
120120

121121
if !bytes.Equal(hdr, cb) {
@@ -136,17 +136,17 @@ func (c *copyrightApplier) Apply(file string) (err error) {
136136
if n >= len(cb) {
137137
// Read rest of file to the buffer.
138138
if _, err := io.Copy(&c.fileBuff, f); err != nil {
139-
return errors.Wrap(err, "read")
139+
return fmt.Errorf("read error: %w", err)
140140
}
141141
}
142142

143143
// TODO(bwplotka): Not atomic and safest ever, do it better (tmp file?)
144144
if _, err = f.Seek(0, 0); err != nil {
145-
return errors.Wrap(err, "seek")
145+
return fmt.Errorf("seek error: %w", err)
146146
}
147147

148148
if _, err = c.fileBuff.WriteTo(f); err != nil {
149-
return errors.Wrap(err, "write")
149+
return fmt.Errorf("write error: %w", err)
150150
}
151151
}
152152
return nil

0 commit comments

Comments
 (0)