mirror of
https://github.com/rclone/rclone.git
synced 2026-01-07 11:03:15 +00:00
build: update to go1.21rc3 and make go1.19 the minimum required version
Signed-off-by: Anagh Kumar Baranwal <6824881+darthShadow@users.noreply.github.com>
This commit is contained in:
committed by
Nick Craig-Wood
parent
0063d14dbb
commit
0ef0e908ca
@@ -10,3 +10,9 @@ import (
|
||||
func SetGCPercent(percent int) int {
|
||||
return debug.SetGCPercent(percent)
|
||||
}
|
||||
|
||||
// SetMemoryLimit calls the runtime/debug.SetMemoryLimit function to set the
|
||||
// soft-memory limit.
|
||||
func SetMemoryLimit(limit int64) int64 {
|
||||
return debug.SetMemoryLimit(limit)
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
//go:build go1.19
|
||||
// +build go1.19
|
||||
|
||||
package debug
|
||||
|
||||
import (
|
||||
"runtime/debug"
|
||||
)
|
||||
|
||||
// SetMemoryLimit calls the runtime/debug.SetMemoryLimit function to set the
|
||||
// soft-memory limit.
|
||||
func SetMemoryLimit(limit int64) (int64, error) {
|
||||
return debug.SetMemoryLimit(limit), nil
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
//go:build !go1.19
|
||||
// +build !go1.19
|
||||
|
||||
package debug
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
// SetMemoryLimit is a no-op on Go version < 1.19.
|
||||
func SetMemoryLimit(limit int64) (int64, error) {
|
||||
return limit, fmt.Errorf("not implemented on Go version below 1.19: %s", runtime.Version())
|
||||
}
|
||||
Reference in New Issue
Block a user