1
0
Fork 0

Use of Viper and cobra

This commit is contained in:
emile 2016-01-13 22:46:44 +01:00
parent a0b15a0efd
commit 35070f7c1c
No known key found for this signature in database
GPG key ID: D808B4C167352E59
32 changed files with 414 additions and 143 deletions

View file

@ -18,12 +18,13 @@ type Provider interface {
Provide(configurationChan chan<- types.ConfigMessage) error
}
type baseProvider struct {
// BaseProvider should be inherited by providers
type BaseProvider struct {
Watch bool
Filename string
}
func (p *baseProvider) getConfiguration(defaultTemplateFile string, funcMap template.FuncMap, templateObjects interface{}) (*types.Configuration, error) {
func (p *BaseProvider) getConfiguration(defaultTemplateFile string, funcMap template.FuncMap, templateObjects interface{}) (*types.Configuration, error) {
var (
buf []byte
err error