Skip to content

Commit 4d60d67

Browse files
dgryskideadprogram
authored andcommitted
compiler: fixup Sprintf uses
1 parent 9932f2e commit 4d60d67

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/symbol.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ func (c *compilerContext) checkWasmImport(f *ssa.Function, pragma string) {
353353
}
354354
if f.Blocks != nil {
355355
// Defined functions cannot be exported.
356-
c.addError(f.Pos(), fmt.Sprintf("can only use //go:wasmimport on declarations"))
356+
c.addError(f.Pos(), "can only use //go:wasmimport on declarations")
357357
return
358358
}
359359
if f.Signature.Results().Len() > 1 {

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ func buildAndRun(pkgName string, config *compileopts.Config, stdout io.Writer, c
958958
err = run(cmd, result)
959959
if err != nil {
960960
if ctx != nil && ctx.Err() == context.DeadlineExceeded {
961-
stdout.Write([]byte(fmt.Sprintf("--- timeout of %s exceeded, terminating...\n", timeout)))
961+
fmt.Fprintf(stdout, "--- timeout of %s exceeded, terminating...\n", timeout)
962962
err = ctx.Err()
963963
}
964964
return result, &commandError{"failed to run compiled binary", result.Binary, err}

0 commit comments

Comments
 (0)