From 6bbfcf8c2ff74ccaf97bdb9d5d11ddbd07df278b Mon Sep 17 00:00:00 2001 From: qeesung <1245712564@qq.com> Date: Mon, 29 Oct 2018 21:03:30 +0800 Subject: [PATCH] reformat the code --- .codacy.yml | 4 ++-- .travis.yml | 18 +++++++++--------- ascii/ascii_test.go | 1 - image2ascii_test.go | 4 ++-- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.codacy.yml b/.codacy.yml index 5ebfe3c..39faca7 100644 --- a/.codacy.yml +++ b/.codacy.yml @@ -1,4 +1,4 @@ --- exclude_paths: - - '*.md' - - 'vender/**/*' +- '*.md' +- 'vender/**/*' diff --git a/.travis.yml b/.travis.yml index 5de8234..992d86f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,19 @@ language: go os: - - linux - - osx +- linux +- osx go: - - "1.8" - - "1.10.x" - - "1.11.x" - - "tip" - +- "1.8" +- "1.10.x" +- "1.11.x" +- "tip" + before_install: - - go get github.com/mattn/goveralls +- go get github.com/mattn/goveralls script: - - $GOPATH/bin/goveralls -service=travis-ci +- $GOPATH/bin/goveralls -service=travis-ci deploy: provider: releases diff --git a/ascii/ascii_test.go b/ascii/ascii_test.go index 5a4fe6d..aa6306b 100644 --- a/ascii/ascii_test.go +++ b/ascii/ascii_test.go @@ -114,7 +114,6 @@ func TestReverseSlice(t *testing.T) { fmt.Sprintf("%+v reversed should equal to %+v", s, expectedReversedSlice)) } - // ExampleConvertPixelToASCII is a example convert pixel to ascii char func ExampleConvertPixelToASCII() { converter := NewPixelConverter() diff --git a/image2ascii_test.go b/image2ascii_test.go index 2b00724..9fddec8 100644 --- a/image2ascii_test.go +++ b/image2ascii_test.go @@ -8,7 +8,7 @@ import ( func TestParseEmptyFilenameOptions(t *testing.T) { assertions := assert.New(t) imageFilename = "" - _, err :=parseOptions() + _, err := parseOptions() assertions.True(err != nil) } @@ -20,7 +20,7 @@ func TestParseOptions(t *testing.T) { colored = false fixedHeight = 100 fixedWidth = 100 - opt, err :=parseOptions() + opt, err := parseOptions() assertions.True(err == nil) assertions.Equal(ratio, opt.Ratio) assertions.False(fitScreen) -- 2.45.2