diff options
-rw-r--r-- | backend.go | 4 | ||||
-rw-r--r-- | parse_catblob.go | 10 | ||||
-rw-r--r-- | textproto/io.go | 2 |
3 files changed, 8 insertions, 8 deletions
@@ -1,8 +1,8 @@ package libfastimport import ( - "io" "bufio" + "io" "git.lukeshu.com/go/libfastimport/textproto" ) @@ -10,7 +10,7 @@ import ( // A Backend is something that consumes a fast-import stream; the // Backend object provides methods for writing to it. type Backend struct { - w *bufio.Writer + w *bufio.Writer fiw *textproto.FIWriter cbr *textproto.CatBlobReader } diff --git a/parse_catblob.go b/parse_catblob.go index 53f7d52..5daaa77 100644 --- a/parse_catblob.go +++ b/parse_catblob.go @@ -2,8 +2,8 @@ package libfastimport import ( "fmt" - "strings" "strconv" + "strings" "git.lukeshu.com/go/libfastimport/textproto" ) @@ -38,7 +38,7 @@ func cbpCatBlob(full string) (sha1 string, data string, err error) { return "", "", fmt.Errorf("cat-blob: malformed header: %q", full) } head := full[:lf] - data = full[lf+1:len(full)-1] + data = full[lf+1 : len(full)-1] if len(head) < 40+6+1 { return "", "", fmt.Errorf("cat-blob: malformed header: %q", head) @@ -75,7 +75,7 @@ func cbpLs(line string) (mode textproto.Mode, dataref string, path textproto.Pat return 0, "", "", fmt.Errorf("ls: missing trailing newline") } if strings.HasPrefix(line, "missing ") { - strPath := line[8:len(line)-1] + strPath := line[8 : len(line)-1] return 0, "", textproto.PathUnescape(strPath), nil } else { sp1 := strings.IndexByte(line, ' ') @@ -85,8 +85,8 @@ func cbpLs(line string) (mode textproto.Mode, dataref string, path textproto.Pat return 0, "", "", fmt.Errorf("ls: malformed line: %q", line) } strMode := line[:sp1] - strRef := line[sp2+1:ht] - strPath := line[ht+1:len(line)-1] + strRef := line[sp2+1 : ht] + strPath := line[ht+1 : len(line)-1] nMode, err := strconv.ParseUint(strMode, 8, 18) if err != nil { diff --git a/textproto/io.go b/textproto/io.go index 1b6402b..f31f950 100644 --- a/textproto/io.go +++ b/textproto/io.go @@ -128,7 +128,7 @@ type CatBlobWriter struct { } func NewCatBlobWriter(w io.Writer) *CatBlobWriter { - return &CatBlobWriter { + return &CatBlobWriter{ w: w, } } |