diff --git a/compiler/symbol.go b/compiler/symbol.go index 5ebdee1471..83bb4ccb26 100644 --- a/compiler/symbol.go +++ b/compiler/symbol.go @@ -353,7 +353,7 @@ func (c *compilerContext) checkWasmImport(f *ssa.Function, pragma string) { } if f.Blocks != nil { // Defined functions cannot be exported. - c.addError(f.Pos(), fmt.Sprintf("can only use //go:wasmimport on declarations")) + c.addError(f.Pos(), "can only use //go:wasmimport on declarations") return } if f.Signature.Results().Len() > 1 { diff --git a/main.go b/main.go index b83ea85f88..8f788efb86 100644 --- a/main.go +++ b/main.go @@ -958,7 +958,7 @@ func buildAndRun(pkgName string, config *compileopts.Config, stdout io.Writer, c err = run(cmd, result) if err != nil { if ctx != nil && ctx.Err() == context.DeadlineExceeded { - stdout.Write([]byte(fmt.Sprintf("--- timeout of %s exceeded, terminating...\n", timeout))) + fmt.Fprintf(stdout, "--- timeout of %s exceeded, terminating...\n", timeout) err = ctx.Err() } return result, &commandError{"failed to run compiled binary", result.Binary, err}