From 8371482cfd944c6dbb1dc2168461501b66851e49 Mon Sep 17 00:00:00 2001 From: Diwaker Gupta <15990+diwakergupta@users.noreply.github.com> Date: Tue, 1 Oct 2024 09:59:22 -0400 Subject: [PATCH] Update min Go version to 1.21. Per the release policy [1], versions earlier than Go 1.21 are no longer supported now that 1.23 has been released. Also remove deprecated usage of ioutil. [1] https://go.dev/doc/devel/release#policy --- go.mod | 4 +++- reader.go | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 2f1ed50..65a4c6e 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,10 @@ module github.com/ghostiam/binstruct -go 1.13 +go 1.21 require ( github.com/davecgh/go-spew v1.1.1 github.com/stretchr/testify v1.3.0 ) + +require github.com/pmezard/go-difflib v1.0.0 // indirect diff --git a/reader.go b/reader.go index b9339c0..aecfa2a 100644 --- a/reader.go +++ b/reader.go @@ -7,7 +7,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "math" ) @@ -93,7 +92,7 @@ type reader struct { } func (r *reader) ReadAll() ([]byte, error) { - b, err := ioutil.ReadAll(r) + b, err := io.ReadAll(r) if r.debug { fmt.Printf("ReadAll(): %s", hex.Dump(b))