Bjørn Erik Pedersen
d90e37e0c6
all: Format code with gofumpt
...
See https://github.com/mvdan/gofumpt
2020-12-03 13:12:58 +01:00
Bjørn Erik Pedersen
73825cfc1c
commands: Make the limit command work again
...
See #4598
2018-04-11 09:50:19 +02:00
Bjørn Erik Pedersen
4d32f2fa89
commands: Make the hugo command non-global
...
See #4598
2018-04-11 09:50:19 +02:00
Bjørn Erik Pedersen
7bc5e89fba
commands: Make more commands non-global
...
See #4598
2018-04-11 09:48:56 +02:00
Bjørn Erik Pedersen
ff2498ee89
Remove ShowPlan
...
It is out of sync with reality, has some disabled tests, and the cost
of getting it up-to-date is too high to be worth it.
2016-11-23 16:35:49 +01:00
Bjørn Erik Pedersen
9798a95670
Make the check command work in multilingual mode
...
Or: some more multilingual TODO-fixes.
See #2309
2016-09-06 18:32:18 +03:00
Bjørn Erik Pedersen
87ca0d0cbe
Clean flags
...
* Reduce the amount of global flags
* Unexport all flag vars and commands vars
* Some other minor flag cleaning
2016-02-05 21:18:45 +01:00
Bjørn Erik Pedersen
e445c35d6a
Fix copyright headers in source files
...
Still need to add some missing headers and an AUTHORS file.
See #1646
2015-12-07 19:57:01 +01:00
Anthony Fok
00d04774f0
Change most global flags into local ones
...
This is to ensure that only the relevant command-line flags
for a certain Hugo subcommand is shown to the end user,
reducing clutter and improving user experience.
Fixes #1624 - CLI UX: Flags shouldn't be global
2015-12-03 00:36:38 -07:00
Anthony Fok
d48781badf
One more error fix in the server command
...
And some other small code clean-up.
See #1502
2015-12-02 11:56:36 -07:00
Bjørn Erik Pedersen
3f0f7eed68
Improve error handling in commands
...
Cobra, the CLI commander in use in Hugo, has some long awaited improvements in the error handling department.
This enables a more centralized error handling approach.
This commit introduces that by changing all the command funcs to `RunE`:
* The core part of the error logging, usage logging and `os.Exit(-1)` is now performed in one place and that one place only.
* The usage text is now only shown on invalid arguments etc. (user errors)
Fixes #1502
2015-12-02 07:07:05 -07:00
Steve Francia
f045d7a611
Change the license to Apache 2.0
2015-11-23 22:16:36 -05:00
Anthony Fok
f2ab0b2608
Improve formatting of Hugo command descriptions
...
Trying to make them look good both in the terminal (`hugo help [command]`)
and in the web browser (http://gohugo.io/commands/ ). :-)
2015-08-04 03:19:57 -06:00
spf13
62dd1d45c1
Hugo config abstracted into a general purpose config library called "Viper".
...
Hugo casting now in own library called "cast"
2014-04-05 01:40:33 -04:00
mattn
8ebb85f1f7
Fix build
2014-02-18 18:40:55 -05:00
spf13
ae9cc09b04
Adding the ability to check the system limit on open files (important for watching large sites)
2014-02-01 12:50:17 -05:00
spf13
94d7fe52f8
Change the interface to use commands and flags instead of just flags.
...
Better organization of main (controller style) code.
2013-09-29 02:10:29 -04:00