From 4cd9e4722c92f05438779d10bf18206f65417644 Mon Sep 17 00:00:00 2001 From: shin- Date: Thu, 25 Apr 2013 09:24:29 -0700 Subject: [PATCH] Fixed graph.Checksums() --- graph.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/graph.go b/graph.go index f6965aa1cf..a2a6f47af7 100644 --- a/graph.go +++ b/graph.go @@ -294,8 +294,8 @@ func (graph *Graph) imageRoot(id string) string { } func (graph *Graph) Checksums(repo Repository) ([]map[string]string, error) { - var checksums map[string]string var result []map[string]string + checksums := map[string]string{} for _, id := range repo { img, err := graph.Get(id) if err != nil { @@ -310,6 +310,7 @@ func (graph *Graph) Checksums(repo Repository) ([]map[string]string, error) { } } i := 0 + result = make([]map[string]string, len(checksums)) for id, sum := range checksums { result[i] = map[string]string{ "id": id,