MCPcopy Create free account
hub / github.com/libgit2/git2go / Read

Method Read

http.go:146–165  ·  view source on GitHub ↗
(buf []byte)

Source from the content-addressed store, hash-verified

144}
145
146func (self *httpSmartSubtransportStream) Read(buf []byte) (int, error) {
147 if !self.sentRequest {
148 self.recvReply.Add(1)
149 if err := self.sendRequest(); err != nil {
150 return 0, err
151 }
152 }
153
154 if err := self.writer.Close(); err != nil {
155 return 0, err
156 }
157
158 self.recvReply.Wait()
159
160 if self.httpError != nil {
161 return 0, self.httpError
162 }
163
164 return self.resp.Body.Read(buf)
165}
166
167func (self *httpSmartSubtransportStream) Write(buf []byte) (int, error) {
168 if self.httpError != nil {

Callers

nothing calls this directly

Calls 3

sendRequestMethod · 0.95
CloseMethod · 0.65
AddMethod · 0.45

Tested by

no test coverage detected