Commit Graph

129 Commits

Author SHA1 Message Date
John McBride e392f3204d
Man pages won't have auto gen tag when option is disabled (#1104)
* Man pages wont have  auto gen tag when option is disabled

- this addresses #741

* Add documentation for doc generation and a changelog
2020-04-29 11:15:55 -06:00
Warren Fernandes 090d94f474
Move projects using Cobra (#1090)
Since there are so many projects using Cobra, we created a separate
document to list them
2020-04-16 11:00:24 -06:00
Julien 47414285f9
Add Github CLI to list of projects using Cobra (#1034) 2020-04-06 11:30:17 -06:00
Joshua Harshman bbffa3aa94
rm circle ci badge (#1073) 2020-04-01 10:27:47 -06:00
Andrea Falzetti 21cab29ef9
fix: undefined er (#1039) 2020-02-19 11:20:06 -05: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
Gregoire Mahe b80588d523 fix undefined cfgFile in documentation (#924) 2019-08-05 09:56:17 -06:00
Carol A. Scott 9a31ddff0e Add Linkerd to list of projects using Cobra (#892) 2019-07-12 09:55:10 -06: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
Haim Ashkenazi dd577bdf31 zsh-completion: added zsh-completion documentation. 2019-06-07 10:09:50 -04:00
umarcor 5755ecf102 [TrivialPatches] Typos in README.md, fix and update CI, update projects list... (#840)
* update Example in README.md (#769)

* specify the color as the required arg (#777)

* command: fix typo in docstring of InheritedFlags (#779)

* add istio to the list of projects built with Cobra (#786)

* remove redundant 'else' (#806)

* add mattermost-server as a project built with Cobra (#824)

* update README.md (#826)

Fix the comment: consistent with others

* add uber/prototool as a project built with Cobra (#831)

* fix(ci): use go vet, update to Go 1.12, update shellcheck to v0.4.6 (#832)

* add go.mod and go.sum (#833)

* chore(travis): move 'diff' job to separate stage in Travis (#839)

* chore(travis): use language configuration list instead of explicit entries in matrix.include (#839)

* chore(travis): update shellcheck-docker to v0.6.0 (#839)

* update(README.md): separate projects by commas, instead of using a list

* chore: update viper to v1.3.2 and go-md2man to v1.0.10

* fix: convert CRLF to LF when comparing files

* use kyoh86/richgo to provide colored test outputs
2019-03-20 17:21:26 -04:00
bpdunni f619abc1d7 Added ExactValidArgs (#765) 2018-10-21 10:01:21 -04:00
Garret Kelly 40172f1635 Remove unneeded imports from README.md example (#767) 2018-10-18 10:37:54 -04:00
Alex Mayer 8d114be902 README: Remove Unneeded Newline (#746) 2018-09-15 18:22:04 -04:00
Marian Steinbach 99dc123558 Replace Giant Swarm 'swarm' with 'gsctl' (#738) 2018-08-29 12:07:45 -04:00
Federico 7c4570c3eb #716 - Removed useless libraries in readme (#717)
Signed-off-by: Federico <federico@imaginecurve.com>
2018-07-22 17:56:44 -04:00
Phillip Johnsen 93959269ad Add Execute func example in README.md (#629)
Trivial addition to the first example in `README.md` that defines the
`cmd.Execute()` function that is referenced further down in the `main.go`
example.
2018-02-05 14:42:58 -08:00
Jake Dodd c2bbfaa12d Add usage example for required flags (#627)
* Add usage example for required flags

* Explain new behavior in MarkFlagRequired godocs
2018-02-05 11:53:53 -08:00
Allen Sun de2d9c4eca Add alibaba/pouch in README.md (#593)
Signed-off-by: Allen Sun <shlallen1990@gmail.com>
2017-12-04 14:13:25 +01:00
Nick Miyake 86783686ca Add documentation for '--version' flag to README (#590) 2017-12-02 18:59:49 +01:00
Nick Miyake 1be1d2841c Make rootCmd private
Update Cobra generator to make rootCmd private rather than
exporting it. Also update examples in README to use the exported
Execute() command rather than referencing unexported rootCmd.

Fixes #556
2017-11-23 08:13:30 +01:00
Nick Miyake fb02817f3c Fix README example to be consistent with others (#585)
Alphabetize and separate builtin imports from external imports
to be gofmt-compliant and consistent with other examples in README.
2017-11-22 16:30:46 -05:00
Tyler Butler d6948b782c Fix minor typo (#579) 2017-11-17 00:24:59 -05:00
Paweł Słomka b3426bbac1 Remove confusing duplicate Execute from README (#554) 2017-10-29 22:09:45 +01:00
Daniel Nephin 83b1f03962 Add a TraverseChildren option to allow for flags on each command in the hierarchy (#299)
Fix #277 
Fix #467
2017-10-07 23:29:11 +02:00
Shahidh K Muhammed 419e0f8d51 doc: add ReST doc generation (#537) 2017-10-07 19:39:47 +02:00
Albert Nigmatzianov bc69223348 Fix dead link in README for cobra generator
Fix #542
2017-10-06 21:18:12 +02:00
Albert Nigmatzianov e8e7fe0355 Shorten README
Fix #501
2017-10-06 12:20:24 +02:00
Albert Nigmatzianov 2df9a53181 Fix MinimumArgs 2017-08-23 12:32:09 +05:00
Albert Nigmatzianov cb747385b3 Retab README.md 2017-08-23 12:32:09 +05:00
Albert Nigmatzianov 1723331773 Update documentation 2017-08-23 12:32:09 +05:00
Albert Nigmatzianov 8bcacfe133 Add more examples of Args field 2017-08-23 12:32:09 +05:00
joelterry 4a7b7e6586 *following 2017-08-20 07:33:59 +05:00
Albert Nigmatzianov 90fc11bbc0 Update README.md 2017-07-24 09:18:37 +02:00
Daniel Nephin f20b4e9c32 Refactor TakesArgs to use an interface for arg validation.
Fix some typos in README and comments.
Move arg validation to after flag validation so that the help flag is run first.
Pass the same args to ValidateArgs as the Run methods receive.
Update README.

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-07-23 09:57:27 +02:00
Eric Paris d89c499964 Allow commands to explicitly state if they do, or do not take arbitrary arguments
Check that arguments are in ValidArgs

If a command defined cmd.ValidArgs check that the argument is actually
in ValidArgs and fail if it is not.
2017-07-23 09:57:27 +02:00
Johanan Liebermann 4d647c8944 Print err instead of home
When 'home' can't be determined it doesn't make sense to print it.
The value of 'err' should be printed instead.
2017-06-24 17:01:00 +02:00
Johanan Liebermann 6471e3de04 Rename main func to initConfig
The function called `main` in the manual creation example should be called
`initConfig`.
2017-06-24 16:56:34 +02:00
Johanan Liebermann f9d34972c1 Fix RootCmd var name
'rootCmd' should be 'RootCmd'.
2017-06-24 16:56:22 +02:00
Johanan Lieberman d638dcb7c7 Improve readability of README
Improve punctuation, fix capitalization in a couple of places and
rephrase some sentences for better readability.
2017-06-23 19:56:08 +02:00
Brian Danowski e458bb7ab8 Reword `become unexpected errors` to `encounter errors` 2017-06-23 16:17:13 +02:00
Albert Nigmatzianov d7cfb13474 Update README.md 2017-06-09 21:55:21 +02:00
Martin Marcher 8d4ce3549a Update README.md
Fix description to actually install generator as well as latest version of the library
2017-05-31 06:54:52 +02:00
Albert Nigmatzianov e606913c4e Fix typos 2017-05-28 12:56:30 +02:00
Albert Nigmatzianov 7918bf6886 Add explanation for viper.BindPflag in README.md
Fix #429

/cc @deltaskelta
2017-05-28 09:16:21 +02:00
Albert Nigmatzianov ca5710c94e Fix link to cobra lib in README.md 2017-05-19 22:27:40 +02:00
Robert Anthony Bellamy 4ba54a0f7f Edit installation command in README.md (#451) 2017-05-19 21:09:26 +02:00