chore(deps): update dependency golangci/golangci-lint to v2.11.3 (#2309)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
renovate[bot]
2026-03-11 22:21:57 +01:00
committed by GitHub
parent 6b80254aba
commit e98da78d56
7 changed files with 11 additions and 8 deletions

View File

@@ -136,10 +136,10 @@ func NewWithFlags(app *kingpin.Application) *Collector {
}
sb := strings.Builder{}
sb.WriteString(fmt.Sprintf("%-32s %-32s\n", "Collector Name", "[PerfID] Perflib Object"))
_, _ = fmt.Fprintf(&sb, "%-32s %-32s\n", "Collector Name", "[PerfID] Perflib Object")
for _, cname := range ConfigDefaults.CollectorsEnabled {
sb.WriteString(fmt.Sprintf("%-32s %-32s\n", cname, collectorDesc[cname]))
_, _ = fmt.Fprintf(&sb, "%-32s %-32s\n", cname, collectorDesc[cname])
}
app.UsageTemplate(sb.String()).Usage(nil)

View File

@@ -118,7 +118,7 @@ func TestDuplicateMetricEntry(t *testing.T) {
Metric: []*dto.Metric{&metric1, &metric2},
}
var duplicateFamily []*dto.MetricFamily
duplicateFamily := make([]*dto.MetricFamily, 0, 1)
duplicateFamily = append(duplicateFamily, &duplicate)
@@ -146,7 +146,7 @@ func TestDuplicateMetricEntry(t *testing.T) {
Metric: []*dto.Metric{&metric1, &metric3},
}
duplicateFamily = []*dto.MetricFamily{}
duplicateFamily = make([]*dto.MetricFamily, 0, 1)
duplicateFamily = append(duplicateFamily, &differentLabels)
// Additional label on second metric should not be cause for duplicate detection
@@ -171,7 +171,7 @@ func TestDuplicateMetricEntry(t *testing.T) {
Type: &metric_type,
Metric: []*dto.Metric{&metric3, &metric4},
}
duplicateFamily = []*dto.MetricFamily{}
duplicateFamily = make([]*dto.MetricFamily, 0, 1)
duplicateFamily = append(duplicateFamily, &differentValues)
// Additional label with different values metric should not be cause for duplicate detection

View File

@@ -71,6 +71,7 @@ func GetDHCPV4ScopeStatistics() ([]DHCPV4Scope, error) {
for _, subnet := range subnets {
if err := (func() error {
var subnetInfo *DHCP_SUBNET_INFO
err := dhcpGetSubnetInfo(subnet.SubnetAddress, &subnetInfo)
if err != nil {
return fmt.Errorf("failed to get subnet info: %w", err)
@@ -109,6 +110,7 @@ func GetDHCPV4ScopeStatistics() ([]DHCPV4Scope, error) {
}
var subnetStatistics *DHCP_FAILOVER_STATISTICS
err = dhcpV4FailoverGetScopeStatistics(subnet.SubnetAddress, &subnetStatistics)
defer dhcpRpcFreeMemory(unsafe.Pointer(subnetStatistics))

View File

@@ -142,7 +142,7 @@ func (c *ClassDecl) Properties() []*PropertyDecl {
// Iterate over the number of properties and fetch each property
for i := range c.NumProperties {
// Get the property pointer at index i
propertyPtr := *(**PropertyDecl)(unsafe.Pointer(uintptr(unsafe.Pointer(propertiesArray)) + uintptr(i)*unsafe.Sizeof(uintptr(0))))
propertyPtr := *(**PropertyDecl)(unsafe.Add(unsafe.Pointer(propertiesArray), uintptr(i)*unsafe.Sizeof(uintptr(0))))
// Append the property to the slice
properties[i] = propertyPtr

View File

@@ -12,6 +12,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build windows
package testutils