Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/cli/cli
/ Flush
Method
Flush
pkg/cmd/pr/create/regexp_writer.go:54–64 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
52
}
53
54
func
(s *RegexpWriter) Flush() (int, error) {
55
if
len(s.buf) > 0 {
56
repl := []byte(s.repl)
57
filtered := s.re.ReplaceAll(s.buf, repl)
58
if
len(filtered) > 0 {
59
return
s.out.Write(filtered)
60
}
61
}
62
63
return
0, nil
64
}
Callers
2
Test_Write
Function · 0.95
handlePush
Function · 0.95
Calls
1
Write
Method · 0.65
Tested by
1
Test_Write
Function · 0.76