diff --git a/release.go b/release.go index 6aefeb2..0151fb8 100644 --- a/release.go +++ b/release.go @@ -248,7 +248,7 @@ func (fi bindataFileInfo) Sys() interface{} { } func compressed_nomemcopy(w io.Writer, asset *Asset, r io.Reader) error { - _, err := fmt.Fprintf(w, `var _%s = "`, asset.Func) + _, err := fmt.Fprintf(w, "var _%s =\n\t\"", asset.Func) if err != nil { return err } @@ -275,7 +275,7 @@ func %sBytes() ([]byte, error) { } func compressed_memcopy(w io.Writer, asset *Asset, r io.Reader) error { - _, err := fmt.Fprintf(w, `var _%s = []byte("`, asset.Func) + _, err := fmt.Fprintf(w, "var _%s = []byte(\n\t\"", asset.Func) if err != nil { return err } diff --git a/stringwriter.go b/stringwriter.go index 77daa04..c2b2989 100644 --- a/stringwriter.go +++ b/stringwriter.go @@ -28,6 +28,11 @@ func (w *StringWriter) Write(p []byte) (n int, err error) { buf[3] = lowerHex[b%16] w.Writer.Write(buf) w.c++ + + // 28 fits nicely with tab width at 4 and a 120 char line limit + if w.c % 28 == 0 { + w.Writer.Write([]byte("\" +\n\t\"")) + } } n++