Skip to content

Commit 022283c

Browse files
authored
Update all code deps (skycoin#292)
* update all code deps * fix CI errors * update golangci-lint and golang version used by github actions workflow * print golangci-lint version on make lint
1 parent c45754b commit 022283c

File tree

981 files changed

+238882
-80317
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

981 files changed

+238882
-80317
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ name: Release
22
# only trigger on pull request closed events
33
on:
44
push:
5-
tags:
6-
- '*'
5+
tags:
6+
- '*'
77
jobs:
88
linux:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/setup-go@v4
1212
with:
13-
go-version: 1.21.x
13+
go-version: 1.23.x
1414
- uses: actions/checkout@v4
1515
- name: Install Requirements
1616
run: |
@@ -21,14 +21,14 @@ jobs:
2121
env:
2222
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2323
run: make github-release
24-
24+
2525
darwin:
2626
needs: linux
2727
runs-on: macos-latest
2828
steps:
2929
- uses: actions/setup-go@v4
3030
with:
31-
go-version: 1.21.x
31+
go-version: 1.23.x
3232
- uses: actions/checkout@v4
3333
- name: Install Requirements
3434
run: |
@@ -39,14 +39,14 @@ jobs:
3939
env:
4040
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4141
run: make github-release-darwin
42-
42+
4343
windows:
4444
needs: darwin
4545
runs-on: windows-latest
4646
steps:
4747
- uses: actions/setup-go@v4
4848
with:
49-
go-version: 1.21.x
49+
go-version: 1.23.x
5050
- uses: actions/checkout@v4
5151
- name: Install Requirements
5252
shell: pwsh

.github/workflows/test.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,46 @@ jobs:
66
steps:
77
- uses: actions/setup-go@v4
88
with:
9-
go-version: 1.21.4
9+
go-version: 1.23.1
1010
- uses: actions/checkout@v3
1111
- name: Install Requirements
1212
run: |
13-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.52.1
13+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0
1414
go mod vendor
1515
- name: Checking Format and Testing
1616
run: make check
1717
- name: Build
1818
run: make build
19-
19+
2020
darwin:
2121
needs: linux
2222
runs-on: macos-latest
2323
steps:
2424
- uses: actions/setup-go@v3
2525
with:
26-
go-version: 1.21.4
26+
go-version: 1.23.1
2727
- uses: actions/checkout@v3
2828
- name: Install Requirements
2929
run: |
30-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.52.1
30+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0
3131
go mod vendor
3232
- name: Checking Format and Testing
3333
run: make check
3434
- name: Build
3535
run: make build
36-
36+
3737
windows:
3838
needs: linux
3939
runs-on: windows-latest
4040
steps:
4141
- uses: actions/setup-go@v3
4242
with:
43-
go-version: 1.21.4
43+
go-version: 1.23.1
4444
- uses: actions/checkout@v3
4545
- name: Install Requirements
4646
run: |
4747
choco install make
48-
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52.1
48+
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0
4949
go mod vendor
5050
- name: Testing
5151
run: |

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ check: lint test ## Run linters and tests
5454
check-windows: lint test-windows ## Run linters and tests on windows
5555

5656
lint: ## Run linters. Use make install-linters first
57+
golangci-lint version
5758
${OPTS} golangci-lint run -c .golangci.yml ./cmd/...
5859
${OPTS} golangci-lint run -c .golangci.yml ./pkg/...
5960
${OPTS} golangci-lint run -c .golangci.yml ./internal/...

cmd/dmsg-server/commands/config/gen.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func init() {
2626
var genConfigCmd = &cobra.Command{
2727
Use: "gen",
2828
Short: "Generate a config file",
29-
Run: func(cmd *cobra.Command, args []string) {
29+
Run: func(_ *cobra.Command, _ []string) {
3030
mLog := logging.NewMasterLogger()
3131
mLog.SetLevel(logrus.InfoLevel)
3232
logger := mLog.PackageLogger("dmsg-server config generator")

cmd/dmsg-server/commands/start/root.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"os"
1212
"strconv"
1313

14-
"github.com/go-chi/chi/v5"
14+
chi "github.com/go-chi/chi/v5"
1515
"github.com/go-chi/chi/v5/middleware"
1616
"github.com/skycoin/skywire-utilities/pkg/buildinfo"
1717
"github.com/skycoin/skywire-utilities/pkg/cmdutil"
@@ -40,8 +40,8 @@ func init() {
4040
var RootCmd = &cobra.Command{
4141
Use: "start",
4242
Short: "Start Dmsg Server",
43-
PreRunE: func(cmd *cobra.Command, args []string) error { return sf.Check() },
44-
Run: func(_ *cobra.Command, args []string) {
43+
PreRunE: func(_ *cobra.Command, _ []string) error { return sf.Check() },
44+
Run: func(_ *cobra.Command, _ []string) {
4545
if _, err := buildinfo.Get().WriteTo(os.Stdout); err != nil {
4646
log.Printf("Failed to output build info: %v", err)
4747
}

cmd/dmsg-socks5/commands/dmsg-socks5.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ var serveCmd = &cobra.Command{
9797
SilenceUsage: true,
9898
DisableSuggestions: true,
9999
DisableFlagsInUseLine: true,
100-
Run: func(cmd *cobra.Command, args []string) {
100+
Run: func(_ *cobra.Command, _ []string) {
101101
log := logging.MustGetLogger("ssh-proxy")
102102
interrupt := make(chan os.Signal, 1)
103103
signal.Notify(interrupt, os.Interrupt)
@@ -178,7 +178,7 @@ var serveCmd = &cobra.Command{
178178
var proxyCmd = &cobra.Command{
179179
Use: "client",
180180
Short: "socks5 proxy client for dmsg socks5 proxy server",
181-
Run: func(cmd *cobra.Command, args []string) {
181+
Run: func(_ *cobra.Command, _ []string) {
182182
log := logging.MustGetLogger("ssh-proxy-client")
183183
var pubKey cipher.PubKey
184184
err := pubKey.Set(pubk)

cmd/dmsgcurl/commands/dmsgcurl.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ DMSG curl utility`,
8686
DisableFlagsInUseLine: true,
8787
Version: buildinfo.Version(),
8888

89-
RunE: func(cmd *cobra.Command, args []string) error {
89+
RunE: func(_ *cobra.Command, args []string) error {
9090
if dmsgcurlLog == nil {
9191
dmsgcurlLog = logging.MustGetLogger("dmsgcurl")
9292
}
@@ -254,7 +254,7 @@ func parseOutputFile(output string, replace bool) (*os.File, error) {
254254
return nil, statErr
255255
}
256256
if replace {
257-
return os.OpenFile(filepath.Clean(output), os.O_RDWR|os.O_CREATE|os.O_TRUNC, os.ModePerm)
257+
return os.OpenFile(filepath.Clean(output), os.O_RDWR|os.O_CREATE|os.O_TRUNC, os.ModePerm) //nolint
258258
}
259259
return nil, os.ErrExist
260260
}

cmd/dmsghttp/commands/dmsghttp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ DMSG http file server`,
6262
DisableFlagsInUseLine: true,
6363
Version: buildinfo.Version(),
6464

65-
Run: func(cmd *cobra.Command, args []string) {
65+
Run: func(_ *cobra.Command, _ []string) {
6666
log := logging.MustGetLogger("dmsghttp")
6767
if dmsgDisc == "" {
6868
log.Fatal("Dmsg Discovery URL not specified")

cmd/dmsgip/commands/dmsgip.go

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,27 @@ import (
1414
"github.com/skycoin/skywire-utilities/pkg/cipher"
1515
"github.com/skycoin/skywire-utilities/pkg/cmdutil"
1616
"github.com/skycoin/skywire-utilities/pkg/logging"
17-
"github.com/skycoin/skywire-utilities/pkg/skyenv"
1817
"github.com/spf13/cobra"
1918

2019
"github.com/skycoin/dmsg/pkg/disc"
2120
"github.com/skycoin/dmsg/pkg/dmsg"
2221
)
2322

2423
var (
25-
dmsgDisc string
24+
dmsgDisc = dmsg.DiscAddr(false)
2625
sk cipher.SecKey
2726
logLvl string
2827
dmsgServers []string
2928
)
3029

3130
func init() {
32-
RootCmd.Flags().StringVarP(&dmsgDisc, "dmsg-disc", "c", "", "dmsg discovery url default:\n"+skyenv.DmsgDiscAddr)
31+
RootCmd.Flags().StringVarP(&dmsgDisc, "dmsg-disc", "c", dmsgDisc, "dmsg discovery url\033[0m")
3332
RootCmd.Flags().StringVarP(&logLvl, "loglvl", "l", "fatal", "[ debug | warn | error | fatal | panic | trace | info ]\033[0m")
3433
if os.Getenv("DMSGIP_SK") != "" {
3534
sk.Set(os.Getenv("DMSGIP_SK")) //nolint
3635
}
37-
RootCmd.Flags().StringSliceVarP(&dmsgServers, "srv", "d", []string{}, "dmsg server public keys\n\r")
38-
RootCmd.Flags().VarP(&sk, "sk", "s", "a random key is generated if unspecified\n\r")
36+
RootCmd.Flags().StringSliceVarP(&dmsgServers, "srv", "d", []string{}, "dmsg server public keys\n\r\033[0m")
37+
RootCmd.Flags().VarP(&sk, "sk", "s", "a random key is generated if unspecified\n\r\033[0m")
3938
}
4039

4140
// RootCmd containsa the root dmsgcurl command
@@ -54,12 +53,7 @@ DMSG ip utility`,
5453
DisableSuggestions: true,
5554
DisableFlagsInUseLine: true,
5655
Version: buildinfo.Version(),
57-
PreRun: func(cmd *cobra.Command, args []string) {
58-
if dmsgDisc == "" {
59-
dmsgDisc = skyenv.DmsgDiscAddr
60-
}
61-
},
62-
RunE: func(cmd *cobra.Command, args []string) error {
56+
RunE: func(_ *cobra.Command, _ []string) error {
6357
log := logging.MustGetLogger("dmsgip")
6458

6559
if logLvl != "" {

cmd/dmsgpty-cli/commands/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ DMSG pseudoterminal command line interface`,
104104
remoteAddr.Port = dmsgpty.DefaultPort
105105
}
106106
},
107-
RunE: func(cmd *cobra.Command, args []string) error {
107+
RunE: func(_ *cobra.Command, _ []string) error {
108108
if _, err := buildinfo.Get().WriteTo(log.Writer()); err != nil {
109109
log.Printf("Failed to output build info: %v", err)
110110
}

0 commit comments

Comments
 (0)