MCPcopy
hub / github.com/FiloSottile/age / writeError

Method writeError

plugin/plugin.go:654–664  ·  view source on GitHub ↗
(args []string, err error)

Source from the content-addressed store, hash-verified

652}
653
654func (p *Plugin) writeError(args []string, err error) error {
655 s := &format.Stanza{Type: "error", Args: args}
656 s.Body = []byte(err.Error())
657 if err := s.Marshal(p.stdout); err != nil {
658 return fmt.Errorf("failed to write error stanza: %v", err)
659 }
660 if err := expectOk(p.sr); err != nil {
661 return fmt.Errorf("%v", err)
662 }
663 return nil
664}
665
666func slicesEqual(s1, s2 []string) bool {
667 if len(s1) != len(s2) {

Callers 3

IdentityV1Method · 0.95
recipientErrorMethod · 0.95
identityErrorMethod · 0.95

Calls 3

expectOkFunction · 0.85
ErrorMethod · 0.45
MarshalMethod · 0.45

Tested by

no test coverage detected