MCPcopy Create free account
hub / github.com/cli/cli / Open

Method Open

pkg/cmd/run/view/view.go:69–76  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

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

Callers 15

TestRunLogFunction · 0.95
writeZipFunction · 0.80
writeTarGzipFunction · 0.80
copyConfigTreeFunction · 0.80
TestCmdSetFunction · 0.80
readJSONLFunction · 0.80
extractTestArchiveFunction · 0.80
copyGitTreeFunction · 0.80
newTerminalFunction · 0.80
AssetsFromArgsFunction · 0.80
uploadAssetFunction · 0.80
sshKeyUploadFunction · 0.80

Calls 2

filepathMethod · 0.95
ErrorfMethod · 0.65

Tested by 12

TestRunLogFunction · 0.76
TestCmdSetFunction · 0.64
extractTestArchiveFunction · 0.64
newTerminalFunction · 0.64
countLinesFunction · 0.64
readZipFileFunction · 0.64
prFromFixturesFunction · 0.64
newTestVirtualTerminalFunction · 0.64
newTestVirtualTerminalFunction · 0.64