diff --git a/go.mod b/go.mod index 9aa1395..f4746b6 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ toolchain go1.23.0 require ( github.com/BurntSushi/toml v1.4.0 + github.com/KimMachineGun/automemlimit v0.6.1 github.com/MakeNowJust/heredoc v1.0.0 github.com/Masterminds/sprig/v3 v3.3.0 github.com/Shopify/ejson v1.5.2 @@ -17,6 +18,7 @@ require ( github.com/spf13/viper v1.14.0 github.com/starkandwayne/goutils v0.0.0-20190115202530-896b8a6904be github.com/stretchr/testify v1.9.0 + go.uber.org/automaxprocs v1.6.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 k8s.io/apimachinery v0.31.0 @@ -28,7 +30,6 @@ require ( require ( dario.cat/mergo v1.0.1 // indirect - github.com/KimMachineGun/automemlimit v0.6.1 // indirect github.com/Knetic/govaluate v3.0.0+incompatible // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.3.0 // indirect @@ -100,7 +101,6 @@ require ( github.com/xlab/treeprint v1.2.0 // indirect github.com/ziutek/utils v0.0.0-20190626152656-eb2a3b364d6c // indirect go.starlark.net v0.0.0-20221205180719-3fd0dac74452 // indirect - go.uber.org/automaxprocs v1.6.0 // indirect golang.org/x/crypto v0.27.0 // indirect golang.org/x/net v0.27.0 // indirect golang.org/x/oauth2 v0.21.0 // indirect diff --git a/go.sum b/go.sum index f0df140..8f8969e 100644 --- a/go.sum +++ b/go.sum @@ -324,6 +324,8 @@ github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qR github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= +github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= diff --git a/subst/main.go b/subst/main.go index 0781f1d..ded6ff6 100644 --- a/subst/main.go +++ b/subst/main.go @@ -1,6 +1,8 @@ package main import ( + "log/slog" + "github.com/KimMachineGun/automemlimit/memlimit" "github.com/bedag/subst/subst/cmd" @@ -16,6 +18,7 @@ func main() { memlimit.FromSystem, ), ), + memlimit.WithLogger(slog.Default()), ) cmd.Execute() }