ソースを参照

add urbit starters

reid 2 年 前
コミット
0e6dd83581
1 ファイル変更12 行追加0 行削除
  1. 12 0
      docker/docker.go

+ 12 - 0
docker/docker.go

@@ -252,6 +252,18 @@ func getCurrentContainerInfo(containerType string) (map[string]string, error) {
 	if !ok {
 		return nil, fmt.Errorf("%s data is not a map", containerType)
 	}
+	tag, ok := containerData["tag"].(string)
+	if !ok {
+		return nil, fmt.Errorf("'tag' is not a string")
+	}
+	hashValue, ok := containerData[hashLabel].(string)
+	if !ok {
+		return nil, fmt.Errorf("'%s' is not a string", hashLabel)
+	}
+	repo, ok := containerData["repo"].(string)
+	if !ok {
+		return nil, fmt.Errorf("'repo' is not a string")
+	}
 	res = make(map[string]string)
 	res["tag"] = containerData["tag"].(string)
 	res["hash"] = containerData[hashLabel].(string)