mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
Merge pull request #101509 from thinpark/park
[k8s.io/apiserver/pkg/endpoints/discovery/]: improve readability
This commit is contained in:
commit
ce5ce8e290
@ -35,6 +35,5 @@ func StorageVersionHash(group, version, kind string) string {
|
|||||||
// the chance of colliding hash P(N,X) approximates to 1-e^(-(N^2)/2^(8X+1)).
|
// the chance of colliding hash P(N,X) approximates to 1-e^(-(N^2)/2^(8X+1)).
|
||||||
// P(10,000, 8) ~= 2.7*10^(-12), which is low enough.
|
// P(10,000, 8) ~= 2.7*10^(-12), which is low enough.
|
||||||
// See https://en.wikipedia.org/wiki/Birthday_problem#Approximations.
|
// See https://en.wikipedia.org/wiki/Birthday_problem#Approximations.
|
||||||
return base64.StdEncoding.EncodeToString(
|
return base64.StdEncoding.EncodeToString(bytes[:8])
|
||||||
bytes[:8])
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user