Skip to content

Commit

Permalink
chore(deps): remove gopkg.in/inf.v0
Browse files Browse the repository at this point in the history
  • Loading branch information
squakez committed May 22, 2023
1 parent 2a7da6b commit b3dc56b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ require (
golang.org/x/term v0.8.0
golang.org/x/text v0.9.0
golang.org/x/time v0.3.0
gopkg.in/inf.v0 v0.9.1
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.25.6
k8s.io/apiextensions-apiserver v0.25.6
Expand Down
6 changes: 2 additions & 4 deletions pkg/trait/jvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ import (

"github.com/scylladb/go-set/strset"

infp "gopkg.in/inf.v0"

corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -225,8 +223,8 @@ func (t *jvmTrait) Apply(e *Environment) error {
if resource.NewScaledQuantity(300, 6).Cmp(memory) > 0 {
percentage = 25
}
memory.AsDec().Mul(memory.AsDec(), infp.NewDec(percentage, 2))
args = append(args, fmt.Sprintf("-Xmx%dM", memory.ScaledValue(resource.Mega)))
memScaled := memory.ScaledValue(resource.Mega) * percentage / 100
args = append(args, fmt.Sprintf("-Xmx%dM", memScaled))
}

// Add mounted resources to the class path
Expand Down

0 comments on commit b3dc56b

Please sign in to comment.