Fix Go formatting in beam and dockerscript

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
This commit is contained in:
Solomon Hykes 2014-04-22 16:09:42 -07:00
parent 1df27fa300
commit c5b6f20d56
11 changed files with 56 additions and 71 deletions

View file

@ -1,15 +1,15 @@
package dockerscript
import (
"github.com/dotcloud/docker/pkg/dockerscript/scanner"
"fmt"
"github.com/dotcloud/docker/pkg/dockerscript/scanner"
"io"
"strings"
)
type Command struct {
Args []string
Children []*Command
Args []string
Children []*Command
Background bool
}
@ -32,7 +32,7 @@ func Parse(src io.Reader) ([]*Command, error) {
func (cmd *Command) subString(depth int) string {
var prefix string
for i:=0; i<depth; i++ {
for i := 0; i < depth; i++ {
prefix += " "
}
s := prefix + strings.Join(cmd.Args, ", ")
@ -85,12 +85,12 @@ func parseArgs(s *Scanner) ([]string, rune, error) {
func parse(s *Scanner, opener string) (expr []*Command, err error) {
/*
defer func() {
fmt.Printf("parse() returned %d commands:\n", len(expr))
for _, c := range expr {
fmt.Printf("\t----> %s\n", c)
}
}()
defer func() {
fmt.Printf("parse() returned %d commands:\n", len(expr))
for _, c := range expr {
fmt.Printf("\t----> %s\n", c)
}
}()
*/
for {
args, tok, err := parseArgs(s)

View file

@ -1,8 +1,8 @@
package scanner
import (
"unicode"
"strings"
"unicode"
)
// extra functions used to hijack the upstream text/scanner
@ -19,4 +19,3 @@ func detectIdent(ch rune) bool {
}
return false
}