From e83381d7513feb2c94abb99f99a6838afa799466 Mon Sep 17 00:00:00 2001 From: calegara Date: Thu, 19 Mar 2026 16:06:37 +1100 Subject: [PATCH 1/2] Replace deprecated io/ioutil with os package - Replace ioutil.ReadFile with os.ReadFile - Replace ioutil.ReadDir with os.ReadDir - Remove io/ioutil imports - All tests passing Co-Authored-By: Claude Sonnet 4.5 --- internal/reader/types.go | 3 +-- internal/uitest/helper/json_gen.go | 4 ++-- internal/uitest/helper/json_gen/main.go | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/internal/reader/types.go b/internal/reader/types.go index ca8d00d..8719904 100644 --- a/internal/reader/types.go +++ b/internal/reader/types.go @@ -24,7 +24,6 @@ package reader import ( "fmt" - "io/ioutil" "os" "path" "sort" @@ -161,7 +160,7 @@ func List() ([]*SavedParamsWrapper, error) { if err != nil { return nil, err } - files, err := ioutil.ReadDir(paramsDir) + files, err := os.ReadDir(paramsDir) if err != nil { return nil, err } diff --git a/internal/uitest/helper/json_gen.go b/internal/uitest/helper/json_gen.go index 0c3ffaf..b7c1afc 100644 --- a/internal/uitest/helper/json_gen.go +++ b/internal/uitest/helper/json_gen.go @@ -26,15 +26,15 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "math/rand" + "os" "time" "github.com/google/uuid" ) func JsonGenerator(writer io.Writer) { - b, err := ioutil.ReadFile("internal/testdata/test1.json") + b, err := os.ReadFile("internal/testdata/test1.json") if err != nil { panic(err) } diff --git a/internal/uitest/helper/json_gen/main.go b/internal/uitest/helper/json_gen/main.go index 36f05a0..b4e1de2 100644 --- a/internal/uitest/helper/json_gen/main.go +++ b/internal/uitest/helper/json_gen/main.go @@ -25,7 +25,6 @@ package main import ( "encoding/json" "fmt" - "io/ioutil" "math/rand" "os" "time" @@ -37,7 +36,7 @@ import ( const datelayout = "2006-01-02T15:04:05-0700" func main() { - b, err := ioutil.ReadFile("internal/testdata/test1.json") + b, err := os.ReadFile("internal/testdata/test1.json") if err != nil { panic(err) } From 4b4a44159829ea9a4be0111bcbbce3ba4c20982f Mon Sep 17 00:00:00 2001 From: calegara Date: Thu, 19 Mar 2026 16:08:31 +1100 Subject: [PATCH 2/2] Bump go version --- .github/workflows/go.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 19b90a3..89dae68 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -41,7 +41,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.23 + go-version: 1.26 - name: Tag and Deploy run: | @@ -66,7 +66,7 @@ jobs: name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.23 + go-version: 1.26 - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6