MCPcopy Index your code
hub / github.com/bitfield/script / String

Method String

script.go:936–942  ·  view source on GitHub ↗

String returns the pipe's contents as a string, together with any error.

()

Source from the content-addressed store, hash-verified

934
935// String returns the pipe's contents as a string, together with any error.
936func (p *Pipe) String() (string, error) {
937 data, err := p.Bytes()
938 if err != nil {
939 p.SetError(err)
940 }
941 return string(data), p.Error()
942}
943
944// Tee copies the pipe's contents to each of the supplied writers, like Unix
945// tee(1). If no writers are supplied, the default is the pipe's standard

Calls 3

BytesMethod · 0.95
SetErrorMethod · 0.95
ErrorMethod · 0.95