fix build error

This commit is contained in:
John Kerl 2023-03-01 00:39:19 -05:00
parent e5af3ac42a
commit 8d3d784adf
2 changed files with 6 additions and 2 deletions

View file

@ -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
}

View file

@ -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