Update golang to 1.20 (#316)

* Update golang to 1.20

* Fix workflow file to make it work on `1.20`

* Update fieldalignment to 0.24.0

* Remove depricated ioutils

ioutils was depricatd and removed, same API available at `os` and `io`
packages now.
This commit is contained in:
Dmitry Kropachev
2025-04-25 13:34:40 -04:00
committed by GitHub
parent 439a1ba517
commit 643d2e775e
6 changed files with 23 additions and 16 deletions

View File

@@ -3,7 +3,6 @@ package main
import (
"flag"
"fmt"
"io/ioutil"
"os"
"strings"
"testing"
@@ -32,17 +31,17 @@ func TestSchemagen(t *testing.T) {
const goldenFile = "testdata/models.go"
if *flagUpdate {
if err := ioutil.WriteFile(goldenFile, b, os.ModePerm); err != nil {
if err := os.WriteFile(goldenFile, b, os.ModePerm); err != nil {
t.Fatal(err)
}
}
golden, err := ioutil.ReadFile(goldenFile)
golden, err := os.ReadFile(goldenFile)
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(string(golden), string(b)); diff != "" {
t.Fatalf(diff)
t.Fatal(diff)
}
}

View File

@@ -1,6 +1,6 @@
module schemagentest
go 1.17
go 1.20
require (
github.com/gocql/gocql v1.7.0