From ad92b2747e7e1ef8aadeb2fa44a7cbee5f7aebbb Mon Sep 17 00:00:00 2001 From: aricart Date: Fri, 22 Nov 2019 13:20:44 -0400 Subject: [PATCH] testing --- .github/workflows/go.yml | 20 +++++++++++++++++++- prompts.go | 5 +++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 3e74296..96b3372 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -6,7 +6,6 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - name: Set up Go 1.13 uses: actions/setup-go@v1 with: @@ -16,6 +15,12 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v1 + - name: Install staticcheck + run: | + echo ::set-env name=PATH::$PATH:$(go env GOPATH)/bin + go get -u honnef.co/go/tools/cmd/staticcheck + + - name: Get dependencies run: | go get -v -t -d ./... @@ -29,3 +34,16 @@ jobs: - name: Test run: go test ./... + + - name: Go List + run: | + echo ::set-env name=GO_LIST::$(go list ./...) + + - name: Vet + run: go vet $GO_LIST + + - name: Static Check + run: staticcheck $GO_LIST + + + diff --git a/prompts.go b/prompts.go index 68bab36..ea11ecc 100644 --- a/prompts.go +++ b/prompts.go @@ -22,6 +22,7 @@ var cli PromptLib // set a Logger during a test (cli.LogFn = t.Log) to debug interactive prompts var LogFn Logger +// lint:ignore U1000 var output io.Writer = os.Stdout type PromptLib interface { @@ -51,6 +52,10 @@ func SetOutput(out io.Writer) { output = out } +func GetOutput() io.Writer { + return output +} + func Underline(s string) string { return fmt.Sprintf("\xff\033[4m\xff%s\xff\033[0m\xff", s) }