Add github actions

This commit is contained in:
Eyal Posener 2020-04-09 19:07:58 +03:00
parent bcff2ec278
commit f929a1cfb4
4 changed files with 28 additions and 18 deletions

19
.github/workflows/goreadme.yml vendored Normal file
View File

@ -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 }}'

View File

@ -13,25 +13,25 @@ import (
var testCmd = &Command{ var testCmd = &Command{
Flags: map[string]Predictor{"cmd-flag": nil}, Flags: map[string]Predictor{"cmd-flag": nil},
Sub: map[string]*Command{ Sub: map[string]*Command{
"flags": &Command{ "flags": {
Flags: map[string]Predictor{ Flags: map[string]Predictor{
"values": set{"a", "a a", "b"}, "values": set{"a", "a a", "b"},
"something": set{""}, "something": set{""},
"nothing": nil, "nothing": nil,
}, },
}, },
"sub1": &Command{ "sub1": {
Flags: map[string]Predictor{"flag1": nil}, Flags: map[string]Predictor{"flag1": nil},
Sub: map[string]*Command{ Sub: map[string]*Command{
"sub11": &Command{ "sub11": {
Flags: map[string]Predictor{"flag11": nil}, Flags: map[string]Predictor{"flag11": nil},
}, },
"sub12": &Command{}, "sub12": {},
}, },
Args: set{"arg1", "arg2"}, Args: set{"arg1", "arg2"},
}, },
"sub2": &Command{}, "sub2": {},
"args": &Command{ "args": {
Args: set{"a", "a a", "b"}, Args: set{"a", "a a", "b"},
}, },
}, },

6
doc.go
View File

@ -15,7 +15,7 @@ This package provides:
* Enables an easy way to install/uninstall the completion of the command. * 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 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 Go Command Bash Completion
@ -27,8 +27,8 @@ Install:
1. Type in your shell: 1. Type in your shell:
go get -u github.com/posener/complete/v2/gocomplete go get -u github.com/posener/complete/v2/gocomplete
COMP_INSTALL=1 gocomplete COMP_INSTALL=1 gocomplete
2. Restart your shell 2. Restart your shell

View File

@ -1,9 +0,0 @@
{
"badges": {
"travis_ci": true,
"code_cov": true,
"golang_ci": true,
"go_doc": true,
"goreadme": true
}
}