diff --git a/generate/main.go b/generate/main.go index d52bee8c..bd1fae11 100644 --- a/generate/main.go +++ b/generate/main.go @@ -3,7 +3,6 @@ package main import ( "bytes" "fmt" - "io/ioutil" "os" "path/filepath" "sort" @@ -397,13 +396,13 @@ func (l *LineWriter) Write(line string, args ...any) { func main() { const dir = "definitions" const enums = "enums" - dirents, err := ioutil.ReadDir(dir) + dirents, err := os.ReadDir(dir) if err != nil { die("unable to read definitions dir %s: %v", dir, err) } { // first parse all enums for use in definitions - f, err := ioutil.ReadFile(filepath.Join(dir, enums)) + f, err := os.ReadFile(filepath.Join(dir, enums)) if err != nil { die("unable to read %s/%s: %v", dir, enums, err) } @@ -414,7 +413,7 @@ func main() { if ent.Name() == enums || strings.HasPrefix(ent.Name(), ".") { continue } - f, err := ioutil.ReadFile(filepath.Join(dir, ent.Name())) + f, err := os.ReadFile(filepath.Join(dir, ent.Name())) if err != nil { die("unable to read %s/%s: %v", dir, ent.Name(), err) } diff --git a/pkg/kgo/record_formatter.go b/pkg/kgo/record_formatter.go index d16427be..2f5d2ce3 100644 --- a/pkg/kgo/record_formatter.go +++ b/pkg/kgo/record_formatter.go @@ -10,7 +10,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "regexp" "strconv" "strings" @@ -1829,7 +1828,7 @@ func (r *RecordReader) readExact(d []byte) error { func (r *RecordReader) readDelim(d []byte) error { // Empty delimiters opt in to reading the rest of the text. if len(d) == 0 { - b, err := ioutil.ReadAll(r.r) + b, err := io.ReadAll(r.r) r.buf = b // ReadAll stops at io.EOF, but we need to bubble that up. if err == nil {