From d8e2b17ebddd9fd2d1a57d98891716d0121db47a Mon Sep 17 00:00:00 2001 From: nullday Date: Mon, 5 Sep 2022 15:07:19 +0800 Subject: [PATCH] Refact the method name of dump and load Signed-off-by: nullday --- pkg/lang/ir/compile.go | 2 +- pkg/lang/ir/util.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/lang/ir/compile.go b/pkg/lang/ir/compile.go index 59e759ebd..1254ee454 100644 --- a/pkg/lang/ir/compile.go +++ b/pkg/lang/ir/compile.go @@ -140,7 +140,7 @@ func (g Graph) Labels() (map[string]string, error) { } } labels[types.ImageLabelVendor] = types.ImageVendorEnvd - code, err := g.RuntimeGraph.DumpRuntimeGraph() + code, err := g.RuntimeGraph.Dump() if err != nil { return labels, err } diff --git a/pkg/lang/ir/util.go b/pkg/lang/ir/util.go index 943d03b6c..b0640c6c6 100644 --- a/pkg/lang/ir/util.go +++ b/pkg/lang/ir/util.go @@ -70,7 +70,7 @@ func getUIDGID() (int, int, error) { return uid, gid, nil } -func (rg *RuntimeGraph) DumpRuntimeGraph() (string, error) { +func (rg *RuntimeGraph) Dump() (string, error) { b, err := msgpack.Marshal(rg) if err != nil { return "", nil @@ -79,7 +79,7 @@ func (rg *RuntimeGraph) DumpRuntimeGraph() (string, error) { return runtimeGraphCode, nil } -func (rg *RuntimeGraph) LoadRuntimeGraph(code string) error { +func (rg *RuntimeGraph) Load(code string) error { b, err := b64.StdEncoding.DecodeString(code) if err != nil { return err