Commit Graph

12 Commits

Author SHA1 Message Date
Julius Volz 6d0edbe630 Fix a bunch of unhandled errors (#1501)
...as discovered by "gosec" (many other ones reported, but not all make
a lot of sense to fix).

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2018-08-05 15:38:25 +02:00
Simon Pasquier 5aac7c840b amtool: add support for stdin to check-config (#1431)
* amtool: add support for stdin to check-config

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Address Stuart's comment

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-07-09 19:27:04 +02:00
Max Inden 402a4aa4a2
Merge pull request #1381 from simonpasquier/add-missing-header
*: add missing license headers
2018-05-28 10:45:39 +02:00
Adam Shannon bf0db5b989 cli: print more config details (#1376)
Example output:

$ amtool check-config alertmanager.yaml
Checking 'alertmanager.yaml'  SUCCESS
Found:
 - global config
 - route
 - 0 inhibit rules
 - 13 receivers
 - 0 templates

Signed-off-by: Adam Shannon <adamkshannon@gmail.com>
2018-05-15 09:17:51 +02:00
Simon Pasquier 0ebaeccd4b *: add missing license headers
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-05-14 17:37:13 +02:00
Simon Pasquier dc5fc02d22 [amtool] use kingpin.v2 (#1330)
* Use default values to store values from config
* fix typo and reserved keywork
* move to long help texts
* add one more unit test for resolver
* update comments

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-04-24 09:35:15 +02:00
stuart nelson e7bc6e2935
Move amtool to modular structure (#1321)
* Move amtool to modular structure

Signed-off-by: Stuart Nelson <stuartnelson3@gmail.com>

* Move toplevel setup back into root.go

Signed-off-by: Stuart Nelson <stuartnelson3@gmail.com>

* Remove confusing alert struct name overwriting

A local variable within the alert subcommand was
using the name of the struct within that file.

Signed-off-by: Stuart Nelson <stuartnelson3@gmail.com>

* change local var name shadowing struct name

Signed-off-by: Stuart Nelson <stuartnelson3@gmail.com>
2018-04-13 13:34:16 +02:00
Calle Pettersson 608848390f Switch amtool to kingpin (#976)
* Switch cmd/amtool to kingpin

* Touch-ups

* Implement long help

* Add missing short-form of --output

* Fix backwards compatibility for config file options

* Fix vendoring

* Review fixes

* Fix flag word order
2017-12-22 11:17:13 +01:00
Jose Donizetti 7151cd4bfc Clean code style - amtool errors (#1099) 2017-11-12 11:43:48 -05:00
Julius Volz 9b72c10134 Minor code cleanups 2017-11-01 23:08:34 +01:00
Jose Donizetti fe390bc28a Improve amtool check-config use and description text (#1016) 2017-10-02 11:22:04 +02:00
Corentin Chary 25e4bb9965 amtool check-config (#978)
This is similar to `promtool check-config` and allows one
to validate the alertmanager configuration (as a git presubmit for example).

`govendor fetch github.com/spf13/{cobra,pflag}` was needed to
have support for `Args`.
2017-09-07 10:58:58 +02:00