gofmt -s -w

This commit is contained in:
jim teeuwen 2011-12-07 13:49:06 +01:00
parent 470290002e
commit 7df69a98df
3 changed files with 9 additions and 10 deletions

View File

@ -14,19 +14,19 @@ type GoWriter struct {
c int
}
func (this *GoWriter) Write(p []byte) (n int, err error) {
func (w *GoWriter) Write(p []byte) (n int, err error) {
if len(p) == 0 {
return
}
for n = range p {
if this.c%12 == 0 {
this.Writer.Write([]byte{'\n'})
this.c = 0
if w.c%12 == 0 {
w.Writer.Write([]byte{'\n'})
w.c = 0
}
fmt.Fprintf(this.Writer, "0x%02x,", p[n])
this.c++
fmt.Fprintf(w.Writer, "0x%02x,", p[n])
w.c++
}
return

View File

@ -5,12 +5,12 @@
package main
import (
"os"
"flag"
"fmt"
"os"
"path"
"strings"
"runtime"
"strings"
"unicode"
)
@ -95,7 +95,6 @@ func main() {
if pipe {
if err = translate(os.Stdin, os.Stdout, *pkgname, *funcname); err != nil {
fmt.Fprintf(os.Stderr, "[e] %s\n", err)
return
}
} else {
var fs, fd *os.File

View File

@ -1,9 +1,9 @@
package main
import (
"io"
"bytes"
"compress/gzip"
"io"
)
func gophercolor_png() ([]byte, error) {