1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00

chore: remove dead code (#6395)

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Charles-Edouard Brétéché 2023-02-24 13:33:57 +01:00 committed by GitHub
parent 07b350166f
commit c279d2f495
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,13 +22,6 @@ func AddResource(ctx Interface, dataRaw []byte) error {
return ctx.AddResource(data)
}
func ReplaceResource(ctx Interface, data map[string]interface{}) error {
if err := ctx.AddResource(nil); err != nil {
return err
}
return ctx.AddResource(data)
}
func AddOldResource(ctx Interface, dataRaw []byte) error {
var data map[string]interface{}
if err := json.Unmarshal(dataRaw, &data); err != nil {
@ -38,13 +31,6 @@ func AddOldResource(ctx Interface, dataRaw []byte) error {
return ctx.AddOldResource(data)
}
func ReplaceOldResource(ctx Interface, data map[string]interface{}) error {
if err := ctx.AddOldResource(nil); err != nil {
return err
}
return ctx.AddOldResource(data)
}
func addToContext(ctx *context, data interface{}, tags ...string) error {
dataRaw, err := json.Marshal(push(data, tags...))
if err != nil {