Merge pull request #87492 from 928234269/fix_staticcheck05

fix static check errors in vendor/k8s.io/apimachinery/pkg/api/resource
This commit is contained in:
Kubernetes Prow Robot 2020-02-05 12:11:55 -08:00 committed by GitHub
commit 9f6f608816
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 12 deletions

View File

@ -43,7 +43,6 @@ test/integration/garbagecollector
test/integration/scheduler_perf
test/integration/ttlcontroller
vendor/k8s.io/apimachinery/pkg/api/meta
vendor/k8s.io/apimachinery/pkg/api/resource
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructuredscheme
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation

View File

@ -37,12 +37,8 @@ var (
big1024 = big.NewInt(1024)
// Commonly needed inf.Dec values-- treat as read only!
decZero = inf.NewDec(0, 0)
decOne = inf.NewDec(1, 0)
decMinusOne = inf.NewDec(-1, 0)
decThousand = inf.NewDec(1000, 0)
dec1024 = inf.NewDec(1024, 0)
decMinus1024 = inf.NewDec(-1024, 0)
decZero = inf.NewDec(0, 0)
decOne = inf.NewDec(1, 0)
// Largest (in magnitude) number allowed.
maxAllowed = infDecAmount{inf.NewDec((1<<63)-1, 0)} // == max int64

View File

@ -28,11 +28,6 @@ import (
inf "gopkg.in/inf.v0"
)
func amount(i int64, exponent int) infDecAmount {
// See the below test-- scale is the negative of an exponent.
return infDecAmount{inf.NewDec(i, inf.Scale(-exponent))}
}
func dec(i int64, exponent int) infDecAmount {
// See the below test-- scale is the negative of an exponent.
return infDecAmount{inf.NewDec(i, inf.Scale(-exponent))}