1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 11:55:40 +01:00

Chance supported minimal Go version back to 1.20 (#514)

This commit is contained in:
Sascha L. Teichmann 2023-11-28 10:37:16 +01:00 committed by GitHub
parent 2fe836bed7
commit 91ab7f6b1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 40 additions and 31 deletions

View file

@ -12,13 +12,14 @@ import (
"bytes"
"crypto/tls"
"io"
"log/slog"
"mime/multipart"
"net/http"
"os"
"path/filepath"
"strings"
"golang.org/x/exp/slog"
"github.com/csaf-poc/csaf_distribution/v3/internal/misc"
"github.com/csaf-poc/csaf_distribution/v3/util"
)
@ -57,7 +58,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),