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

Method Open

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

Source from the content-addressed store, hash-verified

65}
66
67func (c RunLogCache) Open(key string) (*zip.ReadCloser, error) {
68 r, err := zip.OpenReader(c.filepath(key))
69 if err != nil {
70 return nil, fmt.Errorf("opening cache entry: %v", err)
71 }
72
73 return r, nil
74}
75
76func (c RunLogCache) filepath(key string) string {
77 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