-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support to install bash completion script automatically (#63)
* Support to install bash completion script automatically * Bump go from 1.15 to 1.16
- Loading branch information
1 parent
213de14
commit 13c6ba6
Showing
14 changed files
with
112 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,10 +10,10 @@ jobs: | |
name: Build | ||
runs-on: macos-10.15 | ||
steps: | ||
- name: Set up Go 1.15 | ||
- name: Set up Go 1.16 | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.15 | ||
go-version: 1.16 | ||
id: go | ||
- name: Check out code into the Go module directory | ||
uses: actions/[email protected] | ||
|
@@ -29,10 +29,10 @@ jobs: | |
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.15 | ||
- name: Set up Go 1.16 | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.15 | ||
go-version: 1.16 | ||
id: go | ||
- name: Check out code into the Go module directory | ||
uses: actions/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.idea | ||
test.xml | ||
cobra-extension | ||
|
||
*/***/*.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
build: lint fmt | ||
go mod tidy | ||
go build | ||
|
||
copy: build | ||
cp cobra-extension /usr/local/bin | ||
|
||
lint: | ||
golint ./... | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/linuxsuren/cobra-extension/pkg" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func main() { | ||
root := &cobra.Command{ | ||
Use: "cobra-extension", | ||
Short: "This is a demo command for cobra-extension", | ||
} | ||
|
||
root.AddCommand(pkg.NewCompletionCmd(root)) | ||
|
||
if err := root.Execute(); err != nil { | ||
panic(err) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.