Use flags instead of config and remove attributes
This commit is contained in:
parent
5b20dad9ad
commit
665b05eedc
23 changed files with 87 additions and 162 deletions
|
|
@ -31,9 +31,9 @@ func init() {
|
|||
Factories["textfile"] = NewTextFileCollector
|
||||
}
|
||||
|
||||
// Takes a config struct and registers a
|
||||
// Takes a registers a
|
||||
// SetMetricFamilyInjectionHook.
|
||||
func NewTextFileCollector(config Config) (Collector, error) {
|
||||
func NewTextFileCollector() (Collector, error) {
|
||||
if *textFileDirectory == "" {
|
||||
// This collector is enabled by default, so do not fail if
|
||||
// the flag is not passed.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue