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

Function expectOk

plugin/plugin.go:614–623  ·  view source on GitHub ↗
(sr *format.StanzaReader)

Source from the content-addressed store, hash-verified

612}
613
614func expectOk(sr *format.StanzaReader) error {
615 ok, err := sr.ReadStanza()
616 if err != nil {
617 return fmt.Errorf("failed to read OK stanza: %v", err)
618 }
619 if ok.Type != "ok" {
620 return fmt.Errorf("expected OK stanza, got %q", ok.Type)
621 }
622 return expectStanzaWithNoBody(ok, 0)
623}
624
625func readOkOrFail(sr *format.StanzaReader) (*format.Stanza, error) {
626 s, err := sr.ReadStanza()

Callers 3

RecipientV1Method · 0.85
IdentityV1Method · 0.85
writeErrorMethod · 0.85

Calls 2

expectStanzaWithNoBodyFunction · 0.85
ReadStanzaMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…