Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lower required Go version to 1.20 #509

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Download the binaries from the most recent release assets on Github.

### Build from sources

- A recent version of **Go** (1.21+) should be installed. [Go installation](https://go.dev/doc/install)
- A recent version of **Go** (1.20+) should be installed. [Go installation](https://go.dev/doc/install)

- Clone the repository `git clone https://github.com/csaf-poc/csaf_distribution.git `

Expand Down
5 changes: 4 additions & 1 deletion cmd/csaf_downloader/forwarder.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ type forwarder struct {

// newForwarder creates a new forwarder.
func newForwarder(cfg *config) *forwarder {
queue := max(1, cfg.ForwardQueue)
queue := cfg.ForwardQueue
if queue < 1 {
queue = 1
}
return &forwarder{
cfg: cfg,
cmds: make(chan func(*forwarder), queue),
Expand Down
4 changes: 3 additions & 1 deletion examples/purls_searcher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ func newURLFinder(ids []string) *urlFinder {

// clear resets the url finder after a run on an advisory.
func (uf *urlFinder) clear() {
clear(uf.urls)
for i := range uf.urls {
uf.urls[i] = uf.urls[i][:0]
}
}

// dumpURLs dumps the found URLs to stdout.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/csaf-poc/csaf_distribution/v3

go 1.21
go 1.20

require (
github.com/BurntSushi/toml v1.3.2
Expand Down
Loading