if ver != cgroup.V2 {
t.Skipf("cgroup: running on cgroup v%d want v2", ver)
}
- rel := string(buf[1:n]) // The returned path always starts with /, skip it.
+ rel := string(buf[1:n]) // The returned path always starts with /, skip it.
rel = filepath.Join(".", rel) // Make sure this isn't empty string at root.
return mount, rel
}
// GOMAXPROCS defaults to that value.
//
// Otherwise, the Go runtime selects an appropriate default value from a combination of
-// - the number of logical CPUs on the machine,
-// - the process’s CPU affinity mask,
-// - and, on Linux, the process’s average CPU throughput limit based on cgroup CPU
-// quota, if any.
+// - the number of logical CPUs on the machine,
+// - the process’s CPU affinity mask,
+// - and, on Linux, the process’s average CPU throughput limit based on cgroup CPU
+// quota, if any.
//
// If GODEBUG=containermaxprocs=0 is set and GOMAXPROCS is not set by the
// environment variable, then GOMAXPROCS instead defaults to the value of
// guard against O(n^2) behavior when traversing
// backwards through strings with long sequences of
// invalid UTF-8.
- lim := max(end - UTFMax, 0)
+ lim := max(end-UTFMax, 0)
for start--; start >= lim; start-- {
if RuneStart(p[start]) {
break
// guard against O(n^2) behavior when traversing
// backwards through strings with long sequences of
// invalid UTF-8.
- lim := max(end - UTFMax, 0)
+ lim := max(end-UTFMax, 0)
for start--; start >= lim; start-- {
if RuneStart(s[start]) {
break