(key string)
| 64 | } |
| 65 | |
| 66 | func (c RunLogCache) Open(key string) (*zip.ReadCloser, error) { |
| 67 | r, err := zip.OpenReader(c.filepath(key)) |
| 68 | if err != nil { |
| 69 | return nil, fmt.Errorf("opening cache entry: %v", err) |
| 70 | } |
| 71 | |
| 72 | return r, nil |
| 73 | } |
| 74 | |
| 75 | func (c RunLogCache) filepath(key string) string { |
| 76 | return filepath.Join(c.cacheDir, fmt.Sprintf("run-log-%s.zip", key)) |