rclone/lib/debug/go1.19_compat.go
Anagh Kumar Baranwal 0c56c46523 rc: Add commands to set GC Percent & Memory Limit (1.19+)
Signed-off-by: Anagh Kumar Baranwal <6824881+darthShadow@users.noreply.github.com>
2022-11-10 12:07:18 +00:00

15 lines
279 B
Go

//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())
}