Skip to content

Commit 6c34454

Browse files
renamed version to fortiversion to avoid nameing conflict (#375)
Signed-off-by: Sebastian Schubert <basti@schubert.digital>
1 parent 3fc4609 commit 6c34454

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
// You should have received a copy of the GNU General Public License
2929
// along with this program. If not, see <http://www.gnu.org/licenses/>.
3030

31-
package version
31+
package fortiversion
3232

3333
import (
3434
"fmt"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
// You should have received a copy of the GNU General Public License
2929
// along with this program. If not, see <http://www.gnu.org/licenses/>.
3030

31-
package version
31+
package fortiversion
3232

3333
import (
3434
"testing"

pkg/probe/firewall_policy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919

2020
"github.com/prometheus/client_golang/prometheus"
2121

22-
"github.com/prometheus-community/fortigate_exporter/internal/version"
22+
"github.com/prometheus-community/fortigate_exporter/internal/fortiversion"
2323
"github.com/prometheus-community/fortigate_exporter/pkg/fortigatehttpclient"
2424
)
2525

@@ -81,7 +81,7 @@ func probeFirewallPolicies(c fortigatehttpclient.FortiHTTP, _ *TargetMetadata) (
8181
}
8282

8383
combined := false
84-
major, minor, ok := version.ParseVersion(ps4[0].Version)
84+
major, minor, ok := fortiversion.ParseVersion(ps4[0].Version)
8585
if !ok {
8686
log.Printf("Could not parse version number %q", ps4[0].Version)
8787
return nil, false

pkg/probe/probe.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import (
4141
"github.com/prometheus/client_golang/prometheus"
4242

4343
"github.com/prometheus-community/fortigate_exporter/internal/config"
44-
"github.com/prometheus-community/fortigate_exporter/internal/version"
44+
"github.com/prometheus-community/fortigate_exporter/internal/fortiversion"
4545
fortiHTTP "github.com/prometheus-community/fortigate_exporter/pkg/fortigatehttpclient"
4646
)
4747

@@ -110,7 +110,7 @@ func (p *Collector) Probe(ctx context.Context, target map[string]string, hc *htt
110110
return false, nil
111111
}
112112

113-
major, minor, ok := version.ParseVersion(st.Version)
113+
major, minor, ok := fortiversion.ParseVersion(st.Version)
114114
if !ok {
115115
log.Printf("Error: Failed to parse OS version: %q", st.Version)
116116
return false, nil

0 commit comments

Comments
 (0)