Jungho Ahn
2a3a935663
Fix PrintErrln and PrintErrf to behave like PrintErr
...
PrintErrln() and PrintErrf() prints to OutOrStderr while
PrintErr() prints to ErrOrStderr().
This PR fixes PrintErrln and PrintErrf to work like PrintErr.
2019-10-18 15:12:46 -07:00
umarcor
8a4b46fadf
update viper to v1.4.0 ( #953 )
2019-10-13 21:11:37 -06:00
XuZvvHYmZfYdWJNRunkJ
c022f6fabd
Update README.md ( #944 )
...
I think it meant to be `Echo` here instead of `Print` since the command is called `cmdEcho`.
2019-10-07 15:41:51 -06:00
Joshua Harshman
48e6ac4718
update doc w/ newer cmd/root.go example ( #973 )
2019-10-07 15:31:10 -06:00
Joshua Harshman
3745fcd262
add goreportcard to readme ( #971 )
2019-10-03 15:53:10 -06:00
umarcor
19cf35ea77
fix: ensure that testproject is removed even after a failure ( #948 )
...
* fix: ensure that testproject is removed even after a failure
* fix: defer licenseFile
* style: simply defer os.RemoveAll
* cobra/cmd: add getProject test func
2019-09-17 09:02:42 -06:00
Christian Muehlhaeuser
606aa5792c
Used goimports to fix import order ( #912 )
...
Keeps the list sorted and prevents future merge conflicts.
2019-09-16 20:17:19 -06:00
umarcor
4f2877d412
clean(travis): remove shellcheck from before_install ( #947 )
2019-09-16 20:08:40 -06:00
Gregoire Mahe
b80588d523
fix undefined cfgFile in documentation ( #924 )
2019-08-05 09:56:17 -06:00
Bruce Downs
993cc5372a
Adjustments per PR review feedback from @bogem
2019-08-02 01:25:21 +05:00
Bruce Downs
d85196337c
Correct all complaints from goimports
...
* i.e.
* go get golang.org/x/tools/cmd/goimports
* goimports -w *.go
* goimports -w cobra/
2019-08-02 01:25:21 +05:00
Bruce Downs
51f06c7dd1
Correct all complaints from golint
...
* i.e.
* go get golang.org/x/lint/golint
* go list ./... | xargs golint
2019-08-02 01:25:21 +05:00
Bruce Downs
9334a46bd6
Return an error in the case of unrunnable subcommand
...
* credit to @chriswhelix for initial commit
2019-08-02 01:25:21 +05:00
Bruce Downs
9552679939
Add idiomatic handling of go error in distinct main func
2019-08-02 01:25:21 +05:00
Bruce Downs
af29f95b81
Add ignore of cobra posix binary and all of intellij generated files
2019-08-02 01:25:21 +05:00
Joshua Harshman
1c9c46d5c1
Update Generator Docs to reflect changes brought in #817 ( #904 )
2019-07-24 10:10:51 -06:00
umarcor
2d7544ebde
fix missing newline in cmd/add ( #905 )
2019-07-15 09:44:15 -06:00
Carol A. Scott
9a31ddff0e
Add Linkerd to list of projects using Cobra ( #892 )
2019-07-12 09:55:10 -06:00
rsteube
21f39ca07e
bash: fix shellcheck errors ( #889 )
...
https://github.com/koalaman/shellcheck/wiki/SC2207
https://github.com/koalaman/shellcheck/wiki/SC2164
2019-07-11 12:18:47 -06:00
Juan Leni
f2b07da1e2
fixing linter issues
2019-06-07 10:48:23 -04:00
Juan Leni
b635726081
considering stderr in UsageString
2019-06-07 10:48:23 -04:00
Alessio Treglia
e35034f0da
Add tests
2019-06-07 10:48:23 -04:00
Juan Leni
cb27ce11fb
Deprecate and maintain backwards compatibility
2019-06-07 10:48:23 -04:00
Juan Leni
618bc00f80
Allow for explicit output to err/stderr
2019-06-07 10:48:23 -04:00
Juan Leni
0ea93dd60d
Fixed linter issues
2019-06-07 10:48:23 -04:00
Juan Leni
4a716d101b
Extending redirection to stdout, stderr, stdin
2019-06-07 10:48:23 -04:00
Go Frendi Gunawan
5f23f55c81
Update README.md
...
To avoid confusion, it is better to use `localCmd` instead of `rootCmd`
2019-06-07 10:47:24 -04:00
ialidzhikov
9eb9f5c66b
Add gardenctl to projects build using Cobra
...
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
2019-06-07 10:33:55 -04:00
Joshua Harshman
2411ac592a
remove unused struct fields
2019-06-07 10:31:03 -04:00
jharshman
984374f5b6
clean up testproject files after test executes
2019-06-07 10:31:03 -04:00
jharshman
11aa612384
test add
2019-06-07 10:31:03 -04:00
jharshman
303a3e5160
vgo - strip out unused methods
2019-06-07 10:31:03 -04:00
jharshman
0bb1506d25
remove commented field in struct
2019-06-07 10:31:03 -04:00
jharshman
2fea75b02e
vgo - add command working
2019-06-07 10:31:03 -04:00
jharshman
3c42f846c2
fix duplicated dir
2019-06-07 10:31:03 -04:00
jharshman
221bae3986
depricate package name flag
2019-06-07 10:31:03 -04:00
jharshman
b8ad19ad0d
reorder some operations
2019-06-07 10:31:03 -04:00
jharshman
732e4db0d4
vgo - trim some uneeded data from struct
2019-06-07 10:31:03 -04:00
jharshman
c7ac101cf8
vgo - fixing up the add op to work with vgo
2019-06-07 10:31:03 -04:00
jharshman
3741457400
add CommandTemplate
2019-06-07 10:31:03 -04:00
jharshman
50665e9993
vgo - update golden templates
2019-06-07 10:31:03 -04:00
jharshman
642c3c7a0e
vgo - compare generated files against golden files
2019-06-07 10:31:03 -04:00
jharshman
e993d53002
vgo - take named directory or current wd
2019-06-07 10:31:03 -04:00
jharshman
04af6aed80
vgo - add todo
2019-06-07 10:31:03 -04:00
jharshman
c3b51f3a2e
simplify test
2019-06-07 10:31:03 -04:00
jharshman
4c22a20fd4
vgo - remove unused methods
2019-06-07 10:31:03 -04:00
jharshman
73b5215dc7
vgo - fix format
2019-06-07 10:31:03 -04:00
jharshman
44c2d482f6
fix calling to createLicenseFile
2019-06-07 10:31:03 -04:00
jharshman
91dbcb7ffe
remove commented code
2019-06-07 10:31:03 -04:00
jharshman
5b1685faaa
vgo - generate license
2019-06-07 10:31:03 -04:00