Skip to content

Commit

Permalink
Refact the method name of dump and load
Browse files Browse the repository at this point in the history
Signed-off-by: nullday <aseaday@hotmail.com>
  • Loading branch information
aseaday committed Sep 5, 2022
1 parent c614cb6 commit d8e2b17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/lang/ir/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/lang/ir/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit d8e2b17

Please sign in to comment.