From 8fe2ed376a7d540e7ed720967c67d27755e54a48 Mon Sep 17 00:00:00 2001 From: Tim Ebringer Date: Wed, 30 Nov 2016 16:43:35 -0500 Subject: [PATCH 1/3] Add AddFive function --- goauto.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/goauto.go b/goauto.go index 3f0b84f..caf7795 100644 --- a/goauto.go +++ b/goauto.go @@ -11,3 +11,7 @@ func AddThree(a, b, c int) int { func AddFour(a, b, c, d int) int { return a + b + c + d } + +func AddFive(a, b, c, d, e int) int { + return a + b + c + d + e +} From 3afec0ffdbdb107642f50c36f25f0b5866eaa161 Mon Sep 17 00:00:00 2001 From: Tim Ebringer Date: Wed, 30 Nov 2016 16:48:44 -0500 Subject: [PATCH 2/3] Add coverage --- goauto_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/goauto_test.go b/goauto_test.go index d96d882..878458d 100644 --- a/goauto_test.go +++ b/goauto_test.go @@ -26,4 +26,12 @@ func TestAddFour(t *testing.T) { if got != want { t.Errorf("got %d, want %d", got, want) } +} + +func TestAddFive(t *testing.T) { + got := AddFive(3, 7, 11, 13, 17) + want := 51 + if got != want { + t.Errorf("got %d, want %d", got, want) + } } \ No newline at end of file From 8be6833900d6255c9eeccadc85410e3a608d504e Mon Sep 17 00:00:00 2001 From: Tim Ebringer Date: Wed, 30 Nov 2016 18:12:09 -0500 Subject: [PATCH 3/3] Include gometalinter in build --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6681615..2c4d1f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,11 @@ language: go sudo: false go: - - 1.7.1 + - 1.7.3 before_install: - go get github.com/mattn/goveralls + - go get -u github.com/alecthomas/gometalinter + - gometalinter --install script: - - $HOME/gopath/bin/goveralls -service=travis-ci \ No newline at end of file + - $HOME/gopath/bin/goveralls -service=travis-ci + - gometalinter ./... \ No newline at end of file