Skip to content

Commit adc90d7

Browse files
aurcclaude
andauthored
Feature/go 1.26 ioutil fix (#32)
* 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 <noreply@anthropic.com> * Bump go version --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent b5604fc commit adc90d7

4 files changed

Lines changed: 6 additions & 8 deletions

File tree

.github/workflows/go.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Set up Go
4242
uses: actions/setup-go@v2
4343
with:
44-
go-version: 1.23
44+
go-version: 1.26
4545

4646
- name: Tag and Deploy
4747
run: |
@@ -66,7 +66,7 @@ jobs:
6666
name: Set up Go
6767
uses: actions/setup-go@v2
6868
with:
69-
go-version: 1.23
69+
go-version: 1.26
7070
-
7171
name: Run GoReleaser
7272
uses: goreleaser/goreleaser-action@v6

internal/reader/types.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ package reader
2424

2525
import (
2626
"fmt"
27-
"io/ioutil"
2827
"os"
2928
"path"
3029
"sort"
@@ -161,7 +160,7 @@ func List() ([]*SavedParamsWrapper, error) {
161160
if err != nil {
162161
return nil, err
163162
}
164-
files, err := ioutil.ReadDir(paramsDir)
163+
files, err := os.ReadDir(paramsDir)
165164
if err != nil {
166165
return nil, err
167166
}

internal/uitest/helper/json_gen.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ import (
2626
"encoding/json"
2727
"fmt"
2828
"io"
29-
"io/ioutil"
3029
"math/rand"
30+
"os"
3131
"time"
3232

3333
"github.com/google/uuid"
3434
)
3535

3636
func JsonGenerator(writer io.Writer) {
37-
b, err := ioutil.ReadFile("internal/testdata/test1.json")
37+
b, err := os.ReadFile("internal/testdata/test1.json")
3838
if err != nil {
3939
panic(err)
4040
}

internal/uitest/helper/json_gen/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ package main
2525
import (
2626
"encoding/json"
2727
"fmt"
28-
"io/ioutil"
2928
"math/rand"
3029
"os"
3130
"time"
@@ -37,7 +36,7 @@ import (
3736
const datelayout = "2006-01-02T15:04:05-0700"
3837

3938
func main() {
40-
b, err := ioutil.ReadFile("internal/testdata/test1.json")
39+
b, err := os.ReadFile("internal/testdata/test1.json")
4140
if err != nil {
4241
panic(err)
4342
}

0 commit comments

Comments
 (0)