From 63d5d4d9e4fc62b5eefb96c461c2d02349b57ed8 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 20 Apr 2015 16:41:55 -0700 Subject: [PATCH] Fix formatting gofmt -w . Change-Id: If9cf0b7bd810f899edffcd2edf361fa83245bd2a --- bootstrap/command.go | 2 +- ninja_strings.go | 4 ++-- ninja_strings_test.go | 4 ++-- package_ctx.go | 2 +- pathtools/glob.go | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bootstrap/command.go b/bootstrap/command.go index 16a240e..05a3e9d 100644 --- a/bootstrap/command.go +++ b/bootstrap/command.go @@ -21,8 +21,8 @@ import ( "io/ioutil" "os" "path/filepath" - "runtime/pprof" "runtime" + "runtime/pprof" "github.com/google/blueprint" "github.com/google/blueprint/deptools" diff --git a/ninja_strings.go b/ninja_strings.go index d640c87..3492da2 100644 --- a/ninja_strings.go +++ b/ninja_strings.go @@ -132,7 +132,7 @@ func parseDollarStartState(state *parseState, i int, r rune) (stateFunc, error) r >= '0' && r <= '9', r == '_', r == '-': // The beginning of a of the variable name. Output the string and // keep going. - state.pushString(state.str[state.stringStart:i-1]) + state.pushString(state.str[state.stringStart : i-1]) return parseDollarState, nil case r == '$': @@ -143,7 +143,7 @@ func parseDollarStartState(state *parseState, i int, r rune) (stateFunc, error) case r == '{': // This is a bracketted variable name (e.g. "${blah.blah}"). Output // the string and keep going. - state.pushString(state.str[state.stringStart:i-1]) + state.pushString(state.str[state.stringStart : i-1]) state.varStart = i + 1 return parseBracketsState, nil diff --git a/ninja_strings_test.go b/ninja_strings_test.go index 695f14c..b417335 100644 --- a/ninja_strings_test.go +++ b/ninja_strings_test.go @@ -58,12 +58,12 @@ var ninjaParseTestCases = []struct { { input: "$foo${bar}", vars: []string{"foo", "bar"}, - strs: []string{"","", ""}, + strs: []string{"", "", ""}, }, { input: "$foo$$", vars: []string{"foo"}, - strs: []string{"","$$"}, + strs: []string{"", "$$"}, }, { input: "foo bar", diff --git a/package_ctx.go b/package_ctx.go index f160eb4..0d3f0ae 100644 --- a/package_ctx.go +++ b/package_ctx.go @@ -563,7 +563,7 @@ func (p *poolFunc) String() string { } type builtinPool struct { - name_ string + name_ string } func (p *builtinPool) packageContext() *PackageContext { diff --git a/pathtools/glob.go b/pathtools/glob.go index 507983e..0d96691 100644 --- a/pathtools/glob.go +++ b/pathtools/glob.go @@ -63,7 +63,7 @@ func isWild(pattern string) bool { func GlobPatternList(patterns []string, prefix string) (globedList []string, depDirs []string, err error) { var ( matches []string - deps []string + deps []string ) globedList = make([]string, 0)