(manifest map[string]interface{})
| 177 | } |
| 178 | |
| 179 | func getVersion(manifest map[string]interface{}) (string, error) { |
| 180 | version, ok := manifest["version"].(string) |
| 181 | if !ok { |
| 182 | return "", errors.New("invalid version string") |
| 183 | } |
| 184 | |
| 185 | return version, nil |
| 186 | } |
| 187 | |
| 188 | // extractTar reads from the io.Reader and writes the files into the directory. |
| 189 | func extractTar(r io.Reader, dir string) error { |