Commit graph

22 commits

Author SHA1 Message Date
Steve Francia c9edb78acc Change generator default license to none
It's questionable that a default license makes any sense from a legal perspective.
If the tool created the license without the user choosing it, then it may not even be applicable.
Best to let the user choose their license with intent.
2021-11-03 15:36:51 -04:00
Steve Francia dcf42b25f7 Change generator to require opting in to viper.
Cobra and Viper are great together, but it's not uncommon to use them apart.
New Cobra users don't know better and including Viper by default adds complexity to the skeleton.
2021-11-03 15:36:51 -04:00
umarcor 8eaca5f0f4 drop mitchellh/go-homedir (#853) 2021-06-30 14:08:43 -04:00
Rob Playford 9a432671fd
fix home directory config not loading (#1282)
leverage `viper.SetConfigType("yaml")` to fix issue regarding home directory configuration failing to load.
2021-06-15 19:52:13 -06:00
Unai Martinez-Corral 652c755d37
Use golangci-lint (#1044)
Use golangci-lint. Repair warnings and errors resulting from linting.
2021-02-07 17:08:50 -07:00
Bruce Downs 9552679939 Add idiomatic handling of go error in distinct main func 2019-08-02 01:25:21 +05:00
jharshman 80ea2901b6 vgo-support - re-working code generator 2019-06-07 10:31:03 -04:00
Anthony Fok cb9cf94690 Restore the use of cobra.OnInitialize in cobra executable
Without cobra.OnInitialize, cobra does not see the --config
command-line option and always tries to load $HOME/.cobra.yaml
instead.
2017-07-30 01:19:17 -06:00
Albert Nigmatzianov 99ff9334bd cmd: Add possibility to specify the target package
Fix #455
2017-06-07 08:07:48 +02:00
Albert Nigmatzianov 4a1a7b086e cmd: Don't print errors from execute to prevent duplication of errors 2017-05-28 12:26:28 +02:00
Albert Nigmatzianov c446db21d3 cmd: Delete projectBase flag
It's redundant and it didn't work earlier anyway.
2017-05-28 12:25:51 +02:00
Albert Nigmatzianov 4cdb38c072 cmd: Use correct HasPrefix function for paths
Updates #448
2017-05-15 09:51:20 +02:00
Albert Nigmatzianov d9414968f8 cmd: Fix error message from go-homedir 2017-05-14 12:03:16 +02:00
Albert Nigmatzianov 3dc7f13b65 cmd: Fix docs 2017-05-09 11:14:33 +02:00
Albert Nigmatzianov 84cba621a0 cmd: Make detection of $HOME work on all systems
Use github.com/mitchellh/go-homedir

Fix #430
2017-05-05 10:35:27 +02:00
Albert Nigmatzianov 0dd1c429a3 cmd: Add more docs 2017-05-05 10:35:27 +02:00
Albert Nigmatzianov 32756eb440 cmd: Rewrite 2017-05-05 10:35:27 +02:00
Elliot Morrison-Reed a3cd8ab85a Use os.Getenv("HOME") instead of "$HOME" for windows compatibility (#337) 2017-04-20 15:35:06 +02:00
Ian Walter d811f40c6a Adding custom license functionality
* Refactoring code that unnecessarily declares a map before making it.
* Cleaning up gpl3 formatting to match other licenses.
* Adding functionality that allows specifying custom license header
  and text in cobra config.
* Using license header and text as templates so that they can use
  template variables (for custom and gpl3 licenses).
* Adding ability to specify no license.
* Adding custom license example to README.
2016-04-27 12:03:26 -04:00
Kevin Kirsche f643f707c9 Update root.go to fix golint bug with comment
Fix the name in the comment to fix a golint bug by not having the variable name begin the comment.
2016-03-30 17:50:52 -04:00
Anthony Fok 1e63ad8ed1 Fine-tune the formatting of Cobra’s generated code 2015-11-20 15:28:40 -07:00
spf13 ea5bc31ac4 Add cobra generator application 2015-10-28 12:51:48 -04:00