Skip to content

Commit

Permalink
Gofmt all .go files
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-clayton committed Jul 13, 2018
1 parent ae9205b commit c0c3f47
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion cmd/gapit/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func traverseStateTree(

nextFilter := filter
if len(filter) != 0 &&
(filter[0] != n.Name && filter[0] != "*") {
(filter[0] != n.Name && filter[0] != "*") {
return nil
}
if len(filter) != 0 {
Expand Down
4 changes: 3 additions & 1 deletion core/app/crash/reporting/stubs.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@ func Enable(ctx context.Context, appName, appVersion string) {}
func Disable() {}

// ReportMinidump encodes and sends a minidump report to the crashURL endpoint.
func ReportMinidump(r Reporter, minidumpName string, minidumpData []byte) (string, error) { return "", nil }
func ReportMinidump(r Reporter, minidumpName string, minidumpData []byte) (string, error) {
return "", nil
}
2 changes: 1 addition & 1 deletion core/app/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type (
CrashReport bool `help:"_Automatically send crash reports to Google"`
DecodeStack string `help:"_Decode a stackdump generated by this executable"`
FullHelp bool `help:"_Display the full help"`
Args string `help:"_A single string that will be parsed into extra individual arguments"`
Args string `help:"_A single string that will be parsed into extra individual arguments"`
}
LogFlags struct {
Level log.Severity `help:"_The severity to enable logs at"`
Expand Down
4 changes: 2 additions & 2 deletions core/data/protoconv/protoconv.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ func Register(toProto, toObject interface{}) {
)

sigs := []generic.Sig{
generic.Sig{Name: "toProto", Interface: func(context.Context, O) (P, error) {return P{}, nil}, Function: toProto},
generic.Sig{Name: "toObject", Interface: func(context.Context, P) (O, error) {return O{}, nil}, Function: toObject},
generic.Sig{Name: "toProto", Interface: func(context.Context, O) (P, error) { return P{}, nil }, Function: toProto},
generic.Sig{Name: "toObject", Interface: func(context.Context, P) (O, error) { return O{}, nil }, Function: toObject},
}
m := generic.CheckSigs(sigs...)
if !m.Ok() {
Expand Down
2 changes: 1 addition & 1 deletion core/os/android/adb/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func (b *binding) FileContents(ctx context.Context, path string) (string, error)
}

// RemoveFile removes the given file from the device
func (b* binding) RemoveFile(ctx context.Context, path string) error {
func (b *binding) RemoveFile(ctx context.Context, path string) error {
_, err := b.Shell("rm", "-f", path).Call(ctx)
return err
}
Expand Down
2 changes: 1 addition & 1 deletion core/os/device/bind/simple.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (b *Simple) FileContents(ctx context.Context, path string) (string, error)
}

// RemoveFile removes the given file from the device
func (b* Simple) RemoveFile(ctx context.Context, path string) error {
func (b *Simple) RemoveFile(ctx context.Context, path string) error {
return os.Remove(path)
}

Expand Down
1 change: 0 additions & 1 deletion core/os/shell/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ func (e *Env) Get(key string) string {
return ""
}


// Add inserts a new environment variable that is of the form "key=value".
// That is, it parses the environment variable if necessary
func (e *Env) Add(key string) {
Expand Down
2 changes: 1 addition & 1 deletion gapil/analysis/uint_value.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"fmt"
"strings"

"github.com/google/gapid/gapil/semantic"
"github.com/google/gapid/core/math/interval"
"github.com/google/gapid/core/math/u64"
"github.com/google/gapid/gapil/semantic"
)

// Value interface compliance checks.
Expand Down
40 changes: 20 additions & 20 deletions gapil/compiler/compiler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,48 +427,48 @@ u32 i = 7
cmd void BitwiseAnd() { i = i & 6 }`,
cmds: []cmd{{N: "BitwiseAnd"}},
expected: expected{data: D(uint32(6))},
}, { ///////////////////////////////////////////////////
name: "Expressions.BinaryOp.LogicalOr",
src: `
}, { ///////////////////////////////////////////////////
name: "Expressions.BinaryOp.LogicalOr",
src: `
bool a bool b bool c bool d
cmd void LogicalOr() {
a = false || false
b = true || false
c = false || true
d = true || true
}`,
cmds: []cmd{{N: "LogicalOr"}},
expected: expected{data: D(false, true, true, true)},
}, { ///////////////////////////////////////////////////
name: "Expressions.BinaryOp.LogicalAnd",
src: `
cmds: []cmd{{N: "LogicalOr"}},
expected: expected{data: D(false, true, true, true)},
}, { ///////////////////////////////////////////////////
name: "Expressions.BinaryOp.LogicalAnd",
src: `
bool a bool b bool c bool d
cmd void LogicalAnd() {
a = false && false
b = true && false
c = false && true
d = true && true
}`,
cmds: []cmd{{N: "LogicalAnd"}},
expected: expected{data: D(false, false, false, true)},
}, { ///////////////////////////////////////////////////
name: "Expressions.BinaryOp.LogicalOr.ShortCircuit",
src: `
cmds: []cmd{{N: "LogicalAnd"}},
expected: expected{data: D(false, false, false, true)},
}, { ///////////////////////////////////////////////////
name: "Expressions.BinaryOp.LogicalOr.ShortCircuit",
src: `
bool a bool b
sub bool True() { return true }
sub bool SideEffect() { b = true return true }
cmd void LogicalOrShortCircuit() { a = True() || SideEffect() }`,
cmds: []cmd{{N: "LogicalOrShortCircuit"}},
expected: expected{data: D(true, false)},
}, { ///////////////////////////////////////////////////
name: "Expressions.BinaryOp.LogicalAnd.ShortCircuit",
src: `
cmds: []cmd{{N: "LogicalOrShortCircuit"}},
expected: expected{data: D(true, false)},
}, { ///////////////////////////////////////////////////
name: "Expressions.BinaryOp.LogicalAnd.ShortCircuit",
src: `
bool a bool b
sub bool False() { return false }
sub bool SideEffect() { b = true return true }
cmd void LogicalAndShortCircuit() { a = False() && SideEffect() }`,
cmds: []cmd{{N: "LogicalAndShortCircuit"}},
expected: expected{data: D(false, false)},
cmds: []cmd{{N: "LogicalAndShortCircuit"}},
expected: expected{data: D(false, false)},
}, { /////////////////////////////////////////////////////
name: "Expressions.BinaryOp.StringConcat",
src: `
Expand Down
2 changes: 1 addition & 1 deletion gapil/semantic/printer/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"strconv"
"strings"

"github.com/google/gapid/gapil/semantic"
"github.com/google/gapid/core/text/reflow"
"github.com/google/gapid/gapil/semantic"
)

func list(l interface{}) string {
Expand Down
4 changes: 3 additions & 1 deletion gapis/api/test/convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,9 @@ func compare(ctx context.Context, got, expected interface{}, name string, fmt ..
return true
}

type ieq interface{ Equals(generic.TO) bool }
type ieq interface {
Equals(generic.TO) bool
}
ieqTy := reflect.TypeOf((*ieq)(nil)).Elem()
gTy, eTy := reflect.TypeOf(g), reflect.TypeOf(e)
if m := generic.Implements(reflect.TypeOf(g), ieqTy); m.Ok() && gTy == eTy {
Expand Down
1 change: 0 additions & 1 deletion gapis/api/test/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@

// Package test is the integration test suite for the api compiler and templates.
package test

3 changes: 1 addition & 2 deletions gapis/client/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func Connect(ctx context.Context, cfg Config) (Client, error) {
cfg.Port, err = process.StartOnDevice(ctx, cfg.Path.System(), process.StartOptions{
Args: append(cfg.Args, layout.GoArgs(ctx)...),
Verbose: true,
Device: bind.Host(ctx),
Device: bind.Host(ctx),
})
if err != nil {
return nil, err
Expand Down Expand Up @@ -92,7 +92,6 @@ func logLevel(ctx context.Context) log.Severity {
return log.Warning
}


func findGapis(ctx context.Context) (*file.Path, error) {
if path, err := layout.Gapis(ctx); err == nil {
return &path, nil
Expand Down
1 change: 0 additions & 1 deletion test/robot/web/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"github.com/google/gapid/test/robot/search/script"
)


func query(w http.ResponseWriter, r *http.Request) (*search.Query, error) {
builder, err := script.Parse(r.Context(), r.FormValue("q"))
if err != nil {
Expand Down

0 comments on commit c0c3f47

Please sign in to comment.