diff --git a/.github/workflows/goreadme.yml b/.github/workflows/goreadme.yml new file mode 100644 index 0000000..0af0519 --- /dev/null +++ b/.github/workflows/goreadme.yml @@ -0,0 +1,19 @@ +on: + pull_request: + branches: [master, v1] + push: + branches: [master, v1] +jobs: + goreadme: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v2 + - name: Update readme according to Go doc + uses: posener/goreadme@v1.2.5 + with: + recursive: 'true' + badge-travisci: 'true' + badge-codecov: 'true' + badge-goreadme: 'true' + github-token: '${{ secrets.GITHUB_TOKEN }}' diff --git a/complete_test.go b/complete_test.go index a7c6834..04b10cc 100644 --- a/complete_test.go +++ b/complete_test.go @@ -13,25 +13,25 @@ import ( var testCmd = &Command{ Flags: map[string]Predictor{"cmd-flag": nil}, Sub: map[string]*Command{ - "flags": &Command{ + "flags": { Flags: map[string]Predictor{ "values": set{"a", "a a", "b"}, "something": set{""}, "nothing": nil, }, }, - "sub1": &Command{ + "sub1": { Flags: map[string]Predictor{"flag1": nil}, Sub: map[string]*Command{ - "sub11": &Command{ + "sub11": { Flags: map[string]Predictor{"flag11": nil}, }, - "sub12": &Command{}, + "sub12": {}, }, Args: set{"arg1", "arg2"}, }, - "sub2": &Command{}, - "args": &Command{ + "sub2": {}, + "args": { Args: set{"a", "a a", "b"}, }, }, diff --git a/doc.go b/doc.go index 51ce8ba..022be3a 100644 --- a/doc.go +++ b/doc.go @@ -15,7 +15,7 @@ This package provides: * Enables an easy way to install/uninstall the completion of the command. The library and tools are extensible such that any program can add its one logic, completion types -or methologies. +or methologies. See the (documentation) https://pkg.go.dev/github.com/posener/complete/v2?tab=doc. Go Command Bash Completion @@ -27,8 +27,8 @@ Install: 1. Type in your shell: - go get -u github.com/posener/complete/v2/gocomplete - COMP_INSTALL=1 gocomplete + go get -u github.com/posener/complete/v2/gocomplete + COMP_INSTALL=1 gocomplete 2. Restart your shell diff --git a/goreadme.json b/goreadme.json deleted file mode 100644 index 025ec76..0000000 --- a/goreadme.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "badges": { - "travis_ci": true, - "code_cov": true, - "golang_ci": true, - "go_doc": true, - "goreadme": true - } -} \ No newline at end of file