Repository: traefik/traefik (language: go)

Issue:
build on 32-bit arches error: overflows int
### Welcome!

- [X] Yes, I've searched similar issues on [GitHub](https://github.com/traefik/traefik/issues) and didn't find any.
- [X] Yes, I've searched similar issues on the [Traefik community forum](https://community.traefik.io) and didn't find any.

### What did you do?

Build traefik-2.11.0 with golang-1.22.0 on 32-bit arches (i586 or arm)

go generate


### What did you see instead?

```
# github.com/traefik/traefik/v2/pkg/collector/hydratation
pkg/collector/hydratation/hydration.go:59:26: defaultNumber * int(time.Second) (constant 42000000000 of type int) overflows int
generate.go:1: running "go": exit status 1
```

64-bit arches build successfully.

### What version of Traefik are you using?

2.11.0

### What is your environment & configuration?

```yaml
# (paste your configuration here)
```

Add more configuration information here.


### If applicable, please paste the log output in DEBUG level

_No response_


Discussion / hints:

Fix patch:
diff --git a/pkg/collector/hydratation/hydration.go b/pkg/collector/hydratation/hydration.go
index 40736f0462..c45cfcfbb1 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))
 		}
@@ -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


Test patch: