I think that changing this in the syscall package will break the Go 1 compatibility guarantee, in that people who are already working around this problem in their code will have their workaround broken.
Use the golang.org/x/sys/unix package instead. There the value is the more reasonable 0xfffffffffffffffff.
What version of Go are you using (
go version
)?go version go1.9.2
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?linux/amd64
What did you do?
package main
import (
"log"
"syscall"
)
func main() {
rlim := syscall.Rlimit{Cur: syscall.RLIM_INFINITY, Max: syscall.RLIM_INFINITY}
log.Println(rlim)
}
build: go build k.go
output: constant -1 overflows uint64
What did you expect to see?
syscall.RLIM_INFINITY can direcly set to syscall.Rlimit.Cur or syscall.Rlimit.Max
The text was updated successfully, but these errors were encountered: