diff --git a/internal/pkg/parsing/lexer/lexer.go b/internal/pkg/parsing/lexer/lexer.go index db7735e43..e2ead0fc2 100644 --- a/internal/pkg/parsing/lexer/lexer.go +++ b/internal/pkg/parsing/lexer/lexer.go @@ -3,7 +3,7 @@ package lexer import ( - "os" + "io/ioutil" "unicode/utf8" "github.com/johnkerl/miller/internal/pkg/parsing/token" @@ -45,7 +45,7 @@ func (s *SourceContext) Source() string { } func NewLexerFile(fpath string) (*Lexer, error) { - src, err := os.ReadFile(fpath) + src, err := ioutil.ReadFile(fpath) if err != nil { return nil, err } diff --git a/tools/build-dsl b/tools/build-dsl index eacbffc68..c31f0ba52 100755 --- a/tools/build-dsl +++ b/tools/build-dsl @@ -52,4 +52,8 @@ fi # Override GOCC codegen with customized error handling cp internal/pkg/parsing/errors.go.template internal/pkg/parsing/errors/errors.go +# We might need a manual replace of os.ReadFile by ioutil.ReadFile in autogen code. Note we don't +# use latest-and-greatest Go compiler version in our go.mod since we want to build on Centos which +# can be trailing-edge in that regard. + for x in internal/pkg/parsing/*/*.go; do gofmt -w $x; done