Skip to content

Commit eeb9df4

Browse files
committed
fix go 1.14 support with static binaryen
1 parent c3e47d2 commit eeb9df4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

builder/tools-builtin.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package builder
55
import (
66
"errors"
77
"fmt"
8-
"os"
8+
"io/ioutil"
99
"sync"
1010
"unsafe"
1111
)
@@ -62,7 +62,7 @@ func RunTool(tool string, args ...string) error {
6262
var wasmOptLock sync.Mutex
6363

6464
func WasmOpt(src, dst string, cfg BinaryenConfig) error {
65-
data, err := os.ReadFile(src)
65+
data, err := ioutil.ReadFile(src)
6666
if err != nil {
6767
return fmt.Errorf("reading source file: %w", err)
6868
}
@@ -72,7 +72,7 @@ func WasmOpt(src, dst string, cfg BinaryenConfig) error {
7272
return fmt.Errorf("running wasm-opt: %w", err)
7373
}
7474

75-
err = os.WriteFile(dst, data, 0666)
75+
err = ioutil.WriteFile(dst, data, 0666)
7676
if err != nil {
7777
return fmt.Errorf("writing destination file: %w", err)
7878
}

0 commit comments

Comments
 (0)