Skip to content

Commit e83381d

Browse files
aurcclaude
andcommitted
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>
1 parent b5604fc commit e83381d

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

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)