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

Bumped Go version to Go 1.21. Using log/slog instead of golang.org/x/exp/slog

This commit is contained in:
Christian Banse 2024-04-23 15:37:43 +02:00
parent fb1cf32e17
commit 9b1480ae3d
19 changed files with 21 additions and 33 deletions

View file

@ -12,6 +12,7 @@ import (
"crypto/tls"
"errors"
"fmt"
"log/slog"
"net/http"
"os"
"runtime"
@ -25,7 +26,6 @@ import (
"github.com/csaf-poc/csaf_distribution/v3/internal/models"
"github.com/csaf-poc/csaf_distribution/v3/internal/options"
"github.com/csaf-poc/csaf_distribution/v3/util"
"golang.org/x/exp/slog"
"golang.org/x/time/rate"
)

View file

@ -11,6 +11,7 @@ package main
import (
"errors"
"fmt"
"log/slog"
"os"
"path/filepath"
"strings"
@ -19,7 +20,6 @@ import (
"github.com/csaf-poc/csaf_distribution/v3/csaf"
"github.com/csaf-poc/csaf_distribution/v3/util"
"golang.org/x/exp/slog"
)
type fullJob struct {

View file

@ -9,11 +9,11 @@
package main
import (
"log/slog"
"os"
"path/filepath"
"github.com/csaf-poc/csaf_distribution/v3/util"
"golang.org/x/exp/slog"
)
type lazyTransaction struct {

View file

@ -11,13 +11,13 @@ package main
import (
"fmt"
"log/slog"
"os"
"path/filepath"
"github.com/csaf-poc/csaf_distribution/v3/internal/options"
"github.com/gofrs/flock"
"golang.org/x/exp/slog"
)
func lock(lockFile *string, fn func() error) error {

View file

@ -10,6 +10,7 @@ package main
import (
"fmt"
"log/slog"
"os"
"path/filepath"
@ -17,7 +18,6 @@ import (
"github.com/csaf-poc/csaf_distribution/v3/util"
"github.com/ProtonMail/gopenpgp/v2/crypto"
"golang.org/x/exp/slog"
)
type processor struct {

View file

@ -13,13 +13,12 @@ import (
"fmt"
"io"
"log"
"log/slog"
"net/http"
"os"
"path/filepath"
"time"
"golang.org/x/exp/slog"
"github.com/csaf-poc/csaf_distribution/v3/internal/certs"
"github.com/csaf-poc/csaf_distribution/v3/internal/filter"
"github.com/csaf-poc/csaf_distribution/v3/internal/models"

View file

@ -19,6 +19,7 @@ import (
"fmt"
"hash"
"io"
"log/slog"
"net/http"
"net/url"
"os"
@ -29,8 +30,6 @@ import (
"sync"
"time"
"golang.org/x/exp/slog"
"github.com/ProtonMail/gopenpgp/v2/crypto"
"golang.org/x/time/rate"

View file

@ -12,14 +12,13 @@ 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"
)

View file

@ -14,6 +14,7 @@ import (
"encoding/json"
"errors"
"io"
"log/slog"
"mime"
"mime/multipart"
"net/http"
@ -22,8 +23,6 @@ import (
"strings"
"testing"
"golang.org/x/exp/slog"
"github.com/csaf-poc/csaf_distribution/v3/internal/options"
"github.com/csaf-poc/csaf_distribution/v3/util"
)

View file

@ -11,11 +11,10 @@ package main
import (
"context"
"log/slog"
"os"
"os/signal"
"golang.org/x/exp/slog"
"github.com/csaf-poc/csaf_distribution/v3/internal/options"
)

View file

@ -8,7 +8,7 @@
package main
import "golang.org/x/exp/slog"
import "log/slog"
// stats contains counters of the downloads.
type stats struct {

View file

@ -11,9 +11,8 @@ package main
import (
"bytes"
"encoding/json"
"log/slog"
"testing"
"golang.org/x/exp/slog"
)
func TestStatsAdd(t *testing.T) {