use io.WriteString instead of fmt.Fprint
remove unnecessary []byte string conversion in funcShell.
diff --git a/func.go b/func.go
index b9b29e9..7114602 100644
--- a/func.go
+++ b/func.go
@@ -552,10 +552,9 @@
Log("$(shell %q) failed: %q", arg, err)
}
- r := string(out)
- r = strings.TrimRight(r, "\n")
- r = strings.Replace(r, "\n", " ", -1)
- fmt.Fprint(w, r)
+ out = bytes.TrimRight(out, "\n")
+ out = bytes.Replace(out, []byte{'\n'}, []byte{' '}, -1)
+ w.Write(out)
}
// https://www.gnu.org/software/make/manual/html_node/Call-Function.html#Call-Function