summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEyal Posener <[email protected]>2020-04-09 19:07:58 +0300
committerEyal Posener <[email protected]>2020-04-09 21:31:51 +0300
commitf929a1cfb4039a5519d84c2deff05cbaf05ce776 (patch)
tree9bb705441dee435a190735387bf92349fa11e782
parentbcff2ec278afb628a8dcb7ded65ad9d3450e4121 (diff)
Add github actions
-rw-r--r--.github/workflows/goreadme.yml19
-rw-r--r--complete_test.go12
-rw-r--r--doc.go6
-rw-r--r--goreadme.json9
4 files changed, 28 insertions, 18 deletions
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/[email protected]
+ 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