From 302a64ac24b465c2bc1b828a19408f0302a412b2 Mon Sep 17 00:00:00 2001 From: Shark Date: Thu, 5 Dec 2024 02:59:38 +0300 Subject: [PATCH] rename config --- config.yml | 2 +- main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.yml b/config.yml index 5860189..ec8995f 100644 --- a/config.yml +++ b/config.yml @@ -13,6 +13,6 @@ oids: - oid: "1.3.6.1.4.1.935.10.1.1.2" # upsESystemSummary - oid: "1.3.6.1.4.1.935.10.1.1.3" # upsEBatterySystem -toNullIfEmpty: #only for int +toNullIfBelowZero: #only for numbers - tne: "upsESystemInputVoltage" - tne: "upsESystemOutputLoad" diff --git a/main.go b/main.go index ae4fe9e..03e68fa 100644 --- a/main.go +++ b/main.go @@ -36,7 +36,7 @@ type Config struct { } `yaml:"oids"` Tnies []struct { Tnie string `yaml:"tne"` - } `yaml:"toNullIfEmpty"` + } `yaml:"toNullIfBelowZero"` } func loadConfig(filename string) (*Config, error) {