MCPcopy
hub / github.com/cli/cli / Open

Method Open

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

Source from the content-addressed store, hash-verified

64}
65
66func (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
75func (c RunLogCache) filepath(key string) string {
76 return filepath.Join(c.cacheDir, fmt.Sprintf("run-log-%s.zip", key))

Callers 15

TestRunLogFunction · 0.95
newTerminalFunction · 0.80
AssetsFromArgsFunction · 0.80
uploadAssetFunction · 0.80
sshKeyUploadFunction · 0.80
runAddFunction · 0.80
editRunFunction · 0.80
addRunFunction · 0.80
openUserFileFunction · 0.80
digestLocalFileArtifactFunction · 0.80
countLinesFunction · 0.80

Calls 2

filepathMethod · 0.95
ErrorfMethod · 0.65

Tested by 8

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