Skip to content

Commit b5c761a

Browse files
authoredOct 7, 2024··
update dependencies, go 1.23 (#76)
doc.ToHTML is deprecated, update usage in cmdline/help.go accordingly.
1 parent 056264c commit b5c761a

File tree

10 files changed

+28
-16
lines changed

10 files changed

+28
-16
lines changed
 

‎.github/workflows/codeql.yml

+8
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ jobs:
3838
- name: Checkout repository
3939
uses: actions/checkout@v3
4040

41+
# Workaround for Go 1.21 compatibility.
42+
# TODO: Remove when GitHub Action runners Support Go 1.21+.
43+
- name: Setup Go
44+
uses: actions/setup-go@v5
45+
with:
46+
go-version-file: "go.mod"
47+
cache: false
48+
4149
# Initializes the CodeQL tools for scanning.
4250
- name: Initialize CodeQL
4351
uses: github/codeql-action/init@v3

‎.github/workflows/linux.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
test:
1111
strategy:
1212
matrix:
13-
go-version: [1.21.x, 1.22.x]
13+
go-version: [1.22.x, 1.23.x]
1414
os: [ubuntu-latest]
1515
runs-on: ${{ matrix.os }}
1616
steps:
@@ -42,7 +42,7 @@ jobs:
4242
- name: Set up Go
4343
uses: actions/setup-go@v5
4444
with:
45-
go-version: 1.22.x
45+
go-version: 1.23.x
4646
cache: true
4747
cache-dependency-path: github.com/vanadium/go.lib/go.sum
4848

‎.github/workflows/macos.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
test:
1111
strategy:
1212
matrix:
13-
go-version: [1.20.x, 1.22.x]
13+
go-version: [1.22.x, 1.23.x]
1414
os: [macos-latest]
1515
runs-on: ${{ matrix.os }}
1616
steps:

‎.github/workflows/windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
build:
1111
strategy:
1212
matrix:
13-
go-version: [1.22.x]
13+
go-version: [1.23.x]
1414
os: [windows-latest]
1515
runs-on: ${{ matrix.os }}
1616
steps:

‎.golangci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ linters:
2222
- govet
2323
- ineffassign
2424
- misspell
25-
- exportloopref
25+
- copyloopvar
2626
- staticcheck
2727
- typecheck
2828
- unconvert

‎cmdline/gendoc/gendoc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func writeOutput(out string, runGoFmt bool) error {
154154
tagsConstraint = fmt.Sprintf("// +build %s\n\n", flagTags)
155155
}
156156

157-
copyright := `// Copyright 2022 The Vanadium Authors. All rights reserved.
157+
copyright := `// Copyright 2024 The Vanadium Authors. All rights reserved.
158158
// Use of this source code is governed by a BSD-style
159159
// license that can be found in the LICENSE file.
160160

‎cmdline/help.go

+4-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"bytes"
99
"flag"
1010
"fmt"
11-
"go/doc"
11+
"go/doc/comment"
1212
"io"
1313
"path/filepath"
1414
"regexp"
@@ -165,12 +165,11 @@ func godocHeader(path, short string) string {
165165
// We try our best to create a header that includes both the command path and
166166
// the short description, but if godoc won't extract a header out of the line,
167167
// we fall back to just returning the command path.
168-
//
169-
// For more details see the comments and implementation of doc.ToHTML:
170-
// http://golang.org/pkg/go/doc/#ToHTML
171168
header := firstRuneToUpper(path + " - " + short)
172169
var buf bytes.Buffer
173-
doc.ToHTML(&buf, "before\n\n"+header+"\n\nafter", nil)
170+
var p comment.Parser
171+
d := p.Parse("before\n\n" + header + "\n\nafter")
172+
buf.Write(new(comment.Printer).HTML(d))
174173
if !bytes.Contains(buf.Bytes(), []byte("<h")) {
175174
return firstRuneToUpper(path)
176175
}

‎go.mod

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.18
44

55
require (
66
github.com/spf13/pflag v1.0.5
7-
golang.org/x/crypto v0.22.0
8-
golang.org/x/net v0.24.0
9-
golang.org/x/sys v0.19.0
7+
golang.org/x/crypto v0.28.0
8+
golang.org/x/net v0.30.0
9+
golang.org/x/sys v0.26.0
1010
)

‎go.sum

+6
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
2121
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
2222
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
2323
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
24+
golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw=
25+
golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U=
2426
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
2527
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
2628
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
@@ -43,6 +45,8 @@ golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
4345
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
4446
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
4547
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
48+
golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4=
49+
golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU=
4650
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
4751
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
4852
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -67,6 +71,8 @@ golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
6771
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
6872
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
6973
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
74+
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
75+
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
7076
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
7177
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
7278
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=

‎nsync/cv_timeout_stress_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
package nsync_test
1010

1111
import (
12-
"fmt"
1312
"math/rand"
1413
"testing"
1514
"time"
@@ -135,7 +134,7 @@ func TestCVTimeoutStress(t *testing.T) {
135134
}
136135
s.mu.AssertHeld()
137136
if s.refs != 0 {
138-
t.Fatalf(fmt.Sprintf("s.refs == %d; expected 0 at end of TestCVWaitStress", s.refs))
137+
t.Fatalf("s.refs == %d; expected 0 at end of TestCVWaitStress", s.refs)
139138
}
140139

141140
s.mu.AssertHeld()

0 commit comments

Comments
 (0)
Please sign in to comment.