Skip to content

Commit bbf9b0d

Browse files
Merge branch 'main' into repo_sync
2 parents 8ac0518 + 2a0f59b commit bbf9b0d

7 files changed

Lines changed: 25 additions & 12 deletions

File tree

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ require (
1818
github.com/prometheus/common v0.66.1 // indirect
1919
github.com/prometheus/procfs v0.16.1 // indirect
2020
go.yaml.in/yaml/v2 v2.4.2 // indirect
21-
golang.org/x/crypto v0.36.0 // indirect
22-
golang.org/x/sys v0.35.0 // indirect
21+
golang.org/x/crypto v0.45.0 // indirect
22+
golang.org/x/sys v0.38.0 // indirect
2323
google.golang.org/protobuf v1.36.8 // indirect
2424
sigs.k8s.io/yaml v1.4.0 // indirect
2525
)

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
4040
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
4141
go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI=
4242
go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU=
43-
golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34=
44-
golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc=
45-
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
46-
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
43+
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
44+
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
45+
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
46+
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
4747
google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc=
4848
google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
4949
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
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

pkg/probe/system_interface_transceivers_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
// Copyright The Prometheus Authors
2+
// Licensed under the Apache License, Version 2.0 (the "License");
3+
// you may not use this file except in compliance with the License.
4+
// You may obtain a copy of the License at
5+
//
6+
// http://www.apache.org/licenses/LICENSE-2.0
7+
//
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
114
package probe
215

316
import (

0 commit comments

Comments
 (0)