Move from deprecated ioutil to os and io packages

This commit is contained in:
KallyDev
2021-09-28 21:30:14 +08:00
committed by GitHub
parent 46c1600ada
commit 8d739c411b
4 changed files with 15 additions and 15 deletions

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"go/build"
"go/types"
"io/ioutil"
"log"
"os"
"path"
"path/filepath"
"strings"
@@ -83,7 +83,7 @@ func run(dest string) error {
return err
}
return ioutil.WriteFile(filepath.Join(dest, "marshaler.go"), []byte(fmt.Sprintf(marsh, destPkg)), 0o666)
return os.WriteFile(filepath.Join(dest, "marshaler.go"), []byte(fmt.Sprintf(marsh, destPkg)), 0o666)
}
func cleanType(typ types.Type, base string) string {