Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/version/main.go → internal/fortiversion/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

package version
package fortiversion

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

package version
package fortiversion

import (
"testing"
Expand Down
4 changes: 2 additions & 2 deletions pkg/probe/firewall_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"github.com/prometheus/client_golang/prometheus"

"github.com/prometheus-community/fortigate_exporter/internal/version"
"github.com/prometheus-community/fortigate_exporter/internal/fortiversion"
"github.com/prometheus-community/fortigate_exporter/pkg/fortigatehttpclient"
)

Expand Down Expand Up @@ -81,7 +81,7 @@ func probeFirewallPolicies(c fortigatehttpclient.FortiHTTP, _ *TargetMetadata) (
}

combined := false
major, minor, ok := version.ParseVersion(ps4[0].Version)
major, minor, ok := fortiversion.ParseVersion(ps4[0].Version)
if !ok {
log.Printf("Could not parse version number %q", ps4[0].Version)
return nil, false
Expand Down
4 changes: 2 additions & 2 deletions pkg/probe/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import (
"github.com/prometheus/client_golang/prometheus"

"github.com/prometheus-community/fortigate_exporter/internal/config"
"github.com/prometheus-community/fortigate_exporter/internal/version"
"github.com/prometheus-community/fortigate_exporter/internal/fortiversion"
fortiHTTP "github.com/prometheus-community/fortigate_exporter/pkg/fortigatehttpclient"
)

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

major, minor, ok := version.ParseVersion(st.Version)
major, minor, ok := fortiversion.ParseVersion(st.Version)
if !ok {
log.Printf("Error: Failed to parse OS version: %q", st.Version)
return false, nil
Expand Down
Loading