MCPcopy
hub / github.com/jesseduffield/lazygit / Write

Method Write

pkg/gocui/view.go:785–792  ·  view source on GitHub ↗

Write appends a byte slice into the view's internal buffer. Because View implements the io.Writer interface, it can be passed as parameter of functions like fmt.Fprintf, fmt.Fprintln, io.Copy, etc. Clear must be called to clear the view's buffer.

(p []byte)

Source from the content-addressed store, hash-verified

783// of functions like fmt.Fprintf, fmt.Fprintln, io.Copy, etc. Clear must
784// be called to clear the view's buffer.
785func (v *View) Write(p []byte) (n int, err error) {
786 v.writeMutex.Lock()
787 defer v.writeMutex.Unlock()
788
789 v.write(p)
790
791 return len(p), nil
792}
793
794func (v *View) write(p []byte) {
795 v.tainted = true

Callers 3

WriteStringMethod · 0.95
NewCmdTaskMethod · 0.45
parseOneMethod · 0.45

Calls 1

writeMethod · 0.95

Tested by

no test coverage detected