MCPcopy
hub / github.com/git-lfs/git-lfs / SendMessageWithLines

Method SendMessageWithLines

ssh/protocol.go:96–118  ·  view source on GitHub ↗
(command string, args []string, lines []string)

Source from the content-addressed store, hash-verified

94}
95
96func (conn *PktlineConnection) SendMessageWithLines(command string, args []string, lines []string) error {
97 err := conn.pl.WritePacketText(command)
98 if err != nil {
99 return err
100 }
101 for _, arg := range args {
102 err = conn.pl.WritePacketText(arg)
103 if err != nil {
104 return err
105 }
106 }
107 err = conn.pl.WriteDelim()
108 if err != nil {
109 return err
110 }
111 for _, line := range lines {
112 err = conn.pl.WritePacketText(line)
113 if err != nil {
114 return err
115 }
116 }
117 return conn.pl.WriteFlush()
118}
119
120func (conn *PktlineConnection) SendMessageWithData(command string, args []string, data io.Reader) error {
121 err := conn.pl.WritePacketText(command)

Callers 1

batchInternalMethod · 0.80

Calls 3

WritePacketTextMethod · 0.65
WriteDelimMethod · 0.65
WriteFlushMethod · 0.65

Tested by

no test coverage detected