diff --git a/Dockerfile b/Dockerfile index f4ea19e..5df7103 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=linux/amd64 docker.io/library/golang:1.18-buster AS builder +FROM --platform=linux/amd64 docker.io/library/golang:1.21 AS builder RUN mkdir -p /app WORKDIR /app diff --git a/cmd/server/system_notification_rule.go b/cmd/server/system_notification_rule.go index a0b00ba..0bcbb4a 100644 --- a/cmd/server/system_notification_rule.go +++ b/cmd/server/system_notification_rule.go @@ -186,9 +186,11 @@ func replaceMetricParameter(l []systemNotification.SystemNotificationMetricParam return s } +/* func modelToYaml(in any) string { a, _ := yaml.Marshal(in) n := len(a) //Find the length of the byte array s := string(a[:n]) //convert to string return s } +*/ diff --git a/go.mod b/go.mod index 90ae410..e1fa182 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ toolchain go1.21.7 require ( github.com/gofrs/uuid v4.0.0+incompatible - github.com/openinfradev/tks-api v0.0.0-20240403055129-c624181041d6 + github.com/openinfradev/tks-api v0.0.0-20240404091154-a3b290667109 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.18.2 gopkg.in/yaml.v2 v2.4.0 diff --git a/go.sum b/go.sum index b41684a..f0668ab 100644 --- a/go.sum +++ b/go.sum @@ -142,8 +142,8 @@ github.com/onsi/ginkgo/v2 v2.4.0 h1:+Ig9nvqgS5OBSACXNk15PLdp0U9XPYROt9CFzVdFGIs= github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo= github.com/onsi/gomega v1.23.0 h1:/oxKu9c2HVap+F3PfKort2Hw5DEU+HGlW8n+tguWsys= github.com/onsi/gomega v1.23.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= -github.com/openinfradev/tks-api v0.0.0-20240403055129-c624181041d6 h1:nGIev8MRx6u/O+owtXVTN/3Wn1xCh9hkqGGP/TdV2SE= -github.com/openinfradev/tks-api v0.0.0-20240403055129-c624181041d6/go.mod h1:OGfXiL0YRby+OzOm+OI0d+wtPkOj3SMCiAv3lvpmaiU= +github.com/openinfradev/tks-api v0.0.0-20240404091154-a3b290667109 h1:fLqD+UXruMR9Chv0ZykLKlDqwT/OibQtO9+nL1Km9To= +github.com/openinfradev/tks-api v0.0.0-20240404091154-a3b290667109/go.mod h1:OGfXiL0YRby+OzOm+OI0d+wtPkOj3SMCiAv3lvpmaiU= github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=