Skip to content

Commit 9f6f608

Browse files
authored
Merge pull request kubernetes#87492 from 928234269/fix_staticcheck05
fix static check errors in vendor/k8s.io/apimachinery/pkg/api/resource
2 parents d90dd93 + 9897f33 commit 9f6f608

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

hack/.staticcheck_failures

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ test/integration/garbagecollector
4343
test/integration/scheduler_perf
4444
test/integration/ttlcontroller
4545
vendor/k8s.io/apimachinery/pkg/api/meta
46-
vendor/k8s.io/apimachinery/pkg/api/resource
4746
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured
4847
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructuredscheme
4948
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation

staging/src/k8s.io/apimachinery/pkg/api/resource/math.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,8 @@ var (
3737
big1024 = big.NewInt(1024)
3838

3939
// Commonly needed inf.Dec values-- treat as read only!
40-
decZero = inf.NewDec(0, 0)
41-
decOne = inf.NewDec(1, 0)
42-
decMinusOne = inf.NewDec(-1, 0)
43-
decThousand = inf.NewDec(1000, 0)
44-
dec1024 = inf.NewDec(1024, 0)
45-
decMinus1024 = inf.NewDec(-1024, 0)
40+
decZero = inf.NewDec(0, 0)
41+
decOne = inf.NewDec(1, 0)
4642

4743
// Largest (in magnitude) number allowed.
4844
maxAllowed = infDecAmount{inf.NewDec((1<<63)-1, 0)} // == max int64

staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ import (
2828
inf "gopkg.in/inf.v0"
2929
)
3030

31-
func amount(i int64, exponent int) infDecAmount {
32-
// See the below test-- scale is the negative of an exponent.
33-
return infDecAmount{inf.NewDec(i, inf.Scale(-exponent))}
34-
}
35-
3631
func dec(i int64, exponent int) infDecAmount {
3732
// See the below test-- scale is the negative of an exponent.
3833
return infDecAmount{inf.NewDec(i, inf.Scale(-exponent))}

0 commit comments

Comments
 (0)