Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github actions #1

Merged
merged 1 commit into from
Nov 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
Expand All @@ -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 ./...
Expand All @@ -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



5 changes: 5 additions & 0 deletions prompts.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
}
Expand Down