Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ jobs:
- macos-15-intel
- macos-26
go:
- '^1.24'
- '^1.25'
- '^1.26'
steps:
- name: Check out repository code
uses: actions/checkout@v4
Expand Down Expand Up @@ -62,7 +61,7 @@ jobs:
os:
- macos-15-intel
go:
- '^1.24'
- '^1.26'
steps:
- name: Check out repository code
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions example/gui-linux/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/Code-Hex/vz/example/gui-linux

go 1.24.0
go 1.26.4

replace github.com/Code-Hex/vz/v3 => ../../

Expand All @@ -13,6 +13,6 @@ require (
github.com/Code-Hex/go-infinity-channel v1.0.0 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/sys v0.39.0 // indirect
golang.org/x/sys v0.45.0 // indirect
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect
)
8 changes: 4 additions & 4 deletions example/gui-linux/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ github.com/Songmu/prompter v0.5.1 h1:IAsttKsOZWSDw7bV1mtGn9TAmLFAjXbp9I/eYmUUogo
github.com/Songmu/prompter v0.5.1/go.mod h1:CS3jEPD6h9IaLaG6afrl1orTgII9+uDWuw95dr6xHSw=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU=
golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0=
golang.org/x/crypto v0.52.0 h1:RMs7fP2rXdep0CftQlK8Uf+kibLm7qkCcradZWYz988=
golang.org/x/crypto v0.52.0/go.mod h1:1QgfPxDqh0T2M/elOJtp9RvuR95kVjir0e6/BvEmGbc=
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY=
golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 h1:CBpWXWQpIRjzmkkA+M7q9Fqnwd2mZr3AFqexg8YTfoM=
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
4 changes: 2 additions & 2 deletions example/linux/go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module github.com/Code-Hex/vz/example/linux

go 1.24.0
go 1.26.4

replace github.com/Code-Hex/vz/v3 => ../../

require (
github.com/Code-Hex/vz/v3 v3.0.0-00010101000000-000000000000
github.com/pkg/term v1.1.0
golang.org/x/sys v0.39.0
golang.org/x/sys v0.45.0
)

require (
Expand Down
8 changes: 4 additions & 4 deletions example/linux/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ github.com/Code-Hex/go-infinity-channel v1.0.0 h1:M8BWlfDOxq9or9yvF9+YkceoTkDI1p
github.com/Code-Hex/go-infinity-channel v1.0.0/go.mod h1:5yUVg/Fqao9dAjcpzoQ33WwfdMWmISOrQloDRn3bsvY=
github.com/pkg/term v1.1.0 h1:xIAAdCMh3QIAy+5FrE8Ad8XoDhEU4ufwbaSozViP9kk=
github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw=
golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU=
golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0=
golang.org/x/crypto v0.52.0 h1:RMs7fP2rXdep0CftQlK8Uf+kibLm7qkCcradZWYz988=
golang.org/x/crypto v0.52.0/go.mod h1:1QgfPxDqh0T2M/elOJtp9RvuR95kVjir0e6/BvEmGbc=
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY=
golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
2 changes: 1 addition & 1 deletion example/macOS/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/Code-Hex/vz/example/macOS

go 1.24.0
go 1.26.4

replace github.com/Code-Hex/vz/v3 => ../../

Expand Down
8 changes: 4 additions & 4 deletions example/macOS/go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
github.com/Code-Hex/go-infinity-channel v1.0.0 h1:M8BWlfDOxq9or9yvF9+YkceoTkDI1pFAqvnP87Zh0Nw=
github.com/Code-Hex/go-infinity-channel v1.0.0/go.mod h1:5yUVg/Fqao9dAjcpzoQ33WwfdMWmISOrQloDRn3bsvY=
golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU=
golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0=
golang.org/x/crypto v0.52.0 h1:RMs7fP2rXdep0CftQlK8Uf+kibLm7qkCcradZWYz988=
golang.org/x/crypto v0.52.0/go.mod h1:1QgfPxDqh0T2M/elOJtp9RvuR95kVjir0e6/BvEmGbc=
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY=
golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/Code-Hex/vz/v3

go 1.24.0
go 1.26.4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This forces anyone who wants to use Code-Hex/vz to switch to go 1.26.4 or newer, which can be complicated in some cases (eg IT controlled environment, …).
Imo it’s up to the modules using Code-Hex/vz to ensure they are using up to date go versions with no known vulnerability rather than Code-Hex/vz forcing them to do so. If Code-Hex/vz starts doing this, this means it will have to constantly update go 1.26.4 to the latest version.
I’d stick to 1.25.0 for this line as 1.25 is still supported (but you have to use latest 1.25 when building)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a nice question to be decided, my daily work is in a high regulated it env and everyone is pushing closing cves to the max, but its really something that needs feedback

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go 1.25 should still be supported unless there is an exceptional reason
https://endoflife.date/go

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most OSS Go components I have release their binaries on Go 1.26 in GitHub Actions, but allow earlier Go versions i.e. Go 1.25 for compilation. Same applies here.

CVEs are unrelated to the version in go.mod - it's more for setting a min version for building.

Since this is a library, and not a binary, it makes sense to keep it lower - builders can build on newer versions without issue.


require (
github.com/Code-Hex/go-infinity-channel v1.0.0
golang.org/x/crypto v0.46.0
golang.org/x/crypto v0.52.0
golang.org/x/mod v0.22.0
)

require golang.org/x/sys v0.39.0 // indirect
require golang.org/x/sys v0.45.0 // indirect
17 changes: 6 additions & 11 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
github.com/Code-Hex/go-infinity-channel v1.0.0 h1:M8BWlfDOxq9or9yvF9+YkceoTkDI1pFAqvnP87Zh0Nw=
github.com/Code-Hex/go-infinity-channel v1.0.0/go.mod h1:5yUVg/Fqao9dAjcpzoQ33WwfdMWmISOrQloDRn3bsvY=
golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI=
golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8=
golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU=
golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0=
golang.org/x/crypto v0.52.0 h1:RMs7fP2rXdep0CftQlK8Uf+kibLm7qkCcradZWYz988=
golang.org/x/crypto v0.52.0/go.mod h1:1QgfPxDqh0T2M/elOJtp9RvuR95kVjir0e6/BvEmGbc=
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/term v0.35.0 h1:bZBVKBudEyhRcajGcNc3jIfWPqV4y/Kt2XcoigOWtDQ=
golang.org/x/term v0.35.0/go.mod h1:TPGtkTLesOwf2DE8CgVYiZinHAOuy5AYUYT1lENIZnA=
golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q=
golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY=
golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/term v0.43.0 h1:S4RLU2sB31O/NCl+zFN9Aru9A/Cq2aqKpTZJ6B+DwT4=
golang.org/x/term v0.43.0/go.mod h1:lrhlHNdQJHO+1qVYiHfFKVuVioJIheAc3fBSMFYEIsk=
6 changes: 3 additions & 3 deletions shared_directory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func TestSingleDirectoryShare(t *testing.T) {
var buf bytes.Buffer
session.Stderr = &buf
if err := session.Run(v.cmd); err != nil && !v.wantErr {
t.Fatalf("failed to run command %q: %v\nstderr: %q", v.cmd, err, buf)
t.Fatalf("failed to run command %q: %v\nstderr: %q", v.cmd, err, buf.String())
}
session.Close()
}
Expand All @@ -132,7 +132,7 @@ func TestSingleDirectoryShare(t *testing.T) {
session.Stderr = &buf
check := "ls /mnt/shared/" + tmpFile
if err := session.Run(check); err != nil {
t.Fatalf("failed to run command %q: %v\nstderr: %q", check, err, buf)
t.Fatalf("failed to run command %q: %v\nstderr: %q", check, err, buf.String())
}
session.Close()
})
Expand Down Expand Up @@ -231,7 +231,7 @@ func TestMultipleDirectoryShare(t *testing.T) {
var buf bytes.Buffer
session.Stderr = &buf
if err := session.Run(v.cmd); err != nil && !v.wantErr {
t.Fatalf("failed to run command %q: %v\nstderr: %q", v.cmd, err, buf)
t.Fatalf("failed to run command %q: %v\nstderr: %q", v.cmd, err, buf.String())
}
session.Close()
}
Expand Down
2 changes: 1 addition & 1 deletion socket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func TestVirtioSocketListener(t *testing.T) {
session.Stderr = &buf
cmd := fmt.Sprintf("echo %s | socat - VSOCK-CONNECT:2:%d", wantData, port)
if err := session.Run(cmd); err != nil {
t.Fatalf("failed to write data to vsock: %v\nstderr: %q", err, buf)
t.Fatalf("failed to write data to vsock: %v\nstderr: %q", err, buf.String())
}
session.Close()

Expand Down
Loading