Ian Walter
02a0b7db0c
Fixing addCmd templating and finishing #266
2016-05-03 22:09:50 -04:00
Ian Walter
784ab4d6eb
Reversing cmd creation order so child cmds get added properly
2016-05-03 00:56:28 -04:00
Ian Walter
274ca840ae
Fixing removal of filepath.join from writeTemplateToFile
2016-05-02 22:37:29 -04:00
Ian Walter
b4c7072b6b
Checking if cmd file exists before trying to create it
2016-04-28 21:23:46 -04:00
Ian Walter
a6cbaf61ec
Working on #266 : Ability to add nested commands
...
* Modified `cobra add` command to be able to parse argument into nested command structure
* Modified `createCmdFile` function to accept cmdPath
* Modified cmdFile template to specify package name and to TitleCase
command names so that they can be accessed by child packages.
* Simplified `writeTemplateToFile` function so that just the file path
is passed instead of base path and filename.
2016-04-27 22:44:53 -04:00
Ian Walter
9a8186dbb5
Improving createLicenseFile function
...
Also fixing typo in README example.
2016-04-27 12:03:26 -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
Rob Terhaar
3dc021e8c7
add gpl2 license
2016-04-27 12:01:30 -04:00
Rob Terhaar
8bf317ef60
add gpl2 license
2016-04-27 12:01:30 -04:00
Kevin Kirsche
3e71c61197
Update init per golint
...
X-Ref: #258
2016-04-01 21:29:12 -04:00
Ian Walter
a0bd6c17b3
Fixing golint warnings
...
* Moving final return outside of if-else
* Removing type declarations that Go can infer from values
* Cleaning up some existing comments
* Changing snake_case variables to camelCase
2016-03-31 09:53:34 -04:00
Anthony Fok
c65e6422ff
Fix typo: exiting → existing
2015-12-17 14:43:23 -07:00
Anthony Fok
c3ef89ad8a
Fix typo: initalize → initialize, etc.
...
Detected by Debian’s Lintian tool
2015-12-17 11:18:55 -07:00
Jared Bydeley
ee6224d01f
Ugly fix for filepath.IsAbs not playing nicely with windows
2015-12-11 15:44:48 -05:00
Jared Bydeley
1f27c09535
Fixed tests for how they are run
2015-12-11 15:44:48 -05:00
Jared Bydeley
3e7fb991e1
Fixed import path issue on Windows
2015-12-11 15:44:48 -05:00
Sobit Akhmedov
9e39e41fb0
fix typo
2015-11-24 14:46:13 +01:00
Christoph Görn
b167d9beaa
add GNU GPL3 as a license
2015-11-23 11:47:14 -07:00
Anthony Fok
4b096512f3
Reflow license text and add copyright year and name
...
* Format license text and header to fit within 80 characters per line
* Remove extra top line from LICENSE file for Apache-2.0
* Remove the FreeBSD-specific disclaimer from the BSD-2-Clause license
* Use {{ .copyright }} to add "Copyright © YEAR FULL NAME" to the
LICENSE file for MIT and BSD licenses.
2015-11-21 23:37:58 -07:00
Anthony Fok
6d6c92d5b7
Parse the full license text as a template
...
... to allow including "Copyright © 2015 NAME HERE" to the output
LICENSE file where necessary
2015-11-21 23:29:20 -07:00
Anthony Fok
0cc7cc2c06
Fix typo in cobra/cmd/init.go
2015-11-20 15:50:06 -07:00
Anthony Fok
1e63ad8ed1
Fine-tune the formatting of Cobra’s generated code
2015-11-20 15:28:40 -07:00
spf13
2a6ed7a106
utilize filepath.Join liberally
...
fixes #176
2015-11-06 11:08:12 -05:00
spf13
1d9d665f6f
improving project path guessing
2015-11-06 10:44:59 -05:00
spf13
9bd7cfaa66
Fix bug where project name isn't properly detected
2015-10-31 22:04:55 -04:00
spf13
8377361429
Add extra feedback on successful initialization
2015-10-28 13:45:33 -04:00
spf13
4f2eaa858f
removing some extra prints
2015-10-28 13:45:08 -04:00
spf13
a7defd47ef
add add command functionality to cobra
2015-10-28 13:43:58 -04:00
spf13
ea5bc31ac4
Add cobra generator application
2015-10-28 12:51:48 -04:00