Explorar el Código

add urbit starters

reid hace 2 años
padre
commit
0e6dd83581
Se han modificado 1 ficheros con 12 adiciones y 0 borrados
  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)