Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:jfkw:go-cgo-pie-boo1221095
traefik
traefik-fix-int-overflow-with-go-generate-10452...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File traefik-fix-int-overflow-with-go-generate-10452.patch of Package traefik
From 86a01a2a2558b05978883703b720a612e95a1b9d Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic <ldez@users.noreply.github.com> Date: Sat, 17 Feb 2024 14:01:10 +0100 Subject: [PATCH 1/2] fix: int overflow with go generate --- pkg/collector/hydratation/hydration.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/collector/hydratation/hydration.go b/pkg/collector/hydratation/hydration.go index 40736f0462..b0d2b316d1 100644 --- a/pkg/collector/hydratation/hydration.go +++ b/pkg/collector/hydratation/hydration.go @@ -56,7 +56,7 @@ func fill(field reflect.Value) error { case reflect.Int64: switch field.Type() { case reflect.TypeOf(types.Duration(time.Second)): - setTyped(field, int64(defaultNumber*int(time.Second))) + setTyped(field, types.Duration(defaultNumber*time.Second)) default: setTyped(field, int64(defaultNumber)) } From 6786d3889f1b6affbd3bdb6e86e6b25b5d8ff4d6 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic <ldez@users.noreply.github.com> Date: Sat, 17 Feb 2024 15:17:31 +0100 Subject: [PATCH 2/2] chore: replace deprecated PtrTo with PointerTo --- pkg/collector/hydratation/hydration.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/collector/hydratation/hydration.go b/pkg/collector/hydratation/hydration.go index b0d2b316d1..c45cfcfbb1 100644 --- a/pkg/collector/hydratation/hydration.go +++ b/pkg/collector/hydratation/hydration.go @@ -98,7 +98,7 @@ func setMap(field reflect.Value) error { key := reflect.ValueOf(fmt.Sprintf("%s%d", baseKeyName, i)) // generate value - ptrType := reflect.PtrTo(field.Type().Elem()) + ptrType := reflect.PointerTo(field.Type().Elem()) ptrValue := reflect.New(ptrType) if err := fill(ptrValue); err != nil { return err
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor