Commit graph

5 commits

Author SHA1 Message Date
irfan sharif
40d25d2c31 Compatibility for multiple GOPATH workspaces
This commit adds the necessary changes to support users with multiple
`GOPATH` workspaces. Previously the `getSrcPath()` function in
`cobra/cmd/helpers.go` would not take into account the fact the the
system `GOPATH` returns a colon-separated list if system was configured
with multiple GOPATH workspaces. If the GOPATH was set to be
`/foo/a:/bar/b`, it would simply append `src/` to the end of the string
literal giving `/foo/a:/bar/b/src` which resulted in undesired behavior.

Following the specs the changeset here adds support for multiple GOPATH
workspaces and if a given package directory is not to be found in any of
the workspaces the first one is chosen, i.e. for `cobra init` it will
first check all workspaces for the specified project and settling on the
first (`/foo/a`) if nothing found.
This preserves backwards compatibility as single workspace environments
are provably unaffected by these changes.
2016-10-01 20:51:36 -04: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