aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Richey <joerichey94@google.com>2018-02-02 16:03:30 -0800
committerJoseph Richey <joerichey94@google.com>2018-02-08 01:17:57 -0800
commit2951db0703f50c18a301b98df5b20c269fa97680 (patch)
treeb4ce151ac4d09d6d59f15c435e87af7f5738c058
parent1565467bb2fc76107d0b0c02169eb0422691f7f1 (diff)
Change Golang formatter
Moves from goimports to [goreturns](https://github.com/sqs/goreturns). This should not effect any code that already compiles as goreturns only adds zero return values, then runs goimports. This is mainly to help improve ergonomics when dealing with multiple return types.
-rw-r--r--Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index a28522e..57c079e 100644
--- a/Makefile
+++ b/Makefile
@@ -130,8 +130,8 @@ update:
# Format all the Go and C code
.PHONY: format format-check
format:
- goimports -l -w $(GO_FILES)
- clang-format -i -style=Google $(C_FILES)
+ @goreturns -l -w $(GO_FILES)
+ @clang-format -i -style=Google $(C_FILES)
format-check:
@goimports -d $(GO_FILES) \
@@ -170,7 +170,7 @@ go-tools:
go get -u github.com/golang/protobuf/protoc-gen-go
go get -u github.com/golang/lint/golint
go get -u github.com/kardianos/govendor
- go get -u golang.org/x/tools/cmd/goimports
+ go get -u sourcegraph.com/sqs/goreturns
go get -u honnef.co/go/tools/cmd/megacheck
##### Setup/Teardown for integration tests (need root permissions) #####