upgrade to go v1.24 (#5562)

* upgrade to go v1.24

* add a macOS-specific //nolint comment too

---------

Co-authored-by: Kenneth Jenkins <51246568+kenjenkins@users.noreply.github.com>
This commit is contained in:
Caleb Doxsey 2025-04-02 15:53:09 -06:00 committed by GitHub
parent 8d9f1bb38e
commit c47055bece
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
89 changed files with 170 additions and 190 deletions

View file

@ -293,6 +293,7 @@ func (s *sharedResourceMonitor) Run(ctx context.Context, envoyPid int) error {
watcherExited := make(chan struct{})
if err := limitWatcher.Watch(ctx); err != nil {
ca(nil)
return fmt.Errorf("failed to start watch on cgroup memory limit: %w", err)
}
go func() {
@ -455,11 +456,11 @@ func (d *cgroupV2Driver) MemoryLimit(cgroup string) (uint64, error) {
if err != nil {
return 0, err
}
max := strings.TrimSpace(string(data))
if max == "max" {
v := strings.TrimSpace(string(data))
if v == "max" {
return 0, nil
}
return strconv.ParseUint(max, 10, 64)
return strconv.ParseUint(v, 10, 64)
}
// Validate implements CgroupDriver.
@ -570,11 +571,11 @@ func (d *cgroupV1Driver) MemoryLimit(cgroup string) (uint64, error) {
if err != nil {
return 0, err
}
max := strings.TrimSpace(string(data))
if max == "max" {
v := strings.TrimSpace(string(data))
if v == "max" {
return 0, nil
}
return strconv.ParseUint(max, 10, 64)
return strconv.ParseUint(v, 10, 64)
}
// Validate implements CgroupDriver.
@ -680,11 +681,11 @@ func (w *memoryLimitWatcher) readValue() (uint64, error) {
if err != nil {
return 0, err
}
max := strings.TrimSpace(string(data))
if max == "max" {
v := strings.TrimSpace(string(data))
if v == "max" {
return 0, nil
}
return strconv.ParseUint(max, 10, 64)
return strconv.ParseUint(v, 10, 64)
}
func (w *memoryLimitWatcher) Watch(ctx context.Context) error {