MCPcopy Index your code
hub / github.com/FiloSottile/age / parseRecipient

Function parseRecipient

parse.go:103–112  ·  view source on GitHub ↗
(arg string)

Source from the content-addressed store, hash-verified

101}
102
103func parseRecipient(arg string) (Recipient, error) {
104 switch {
105 case strings.HasPrefix(arg, "age1pq1"):
106 return ParseHybridRecipient(arg)
107 case strings.HasPrefix(arg, "age1"):
108 return ParseX25519Recipient(arg)
109 default:
110 return nil, fmt.Errorf("unknown recipient type: %q", arg)
111 }
112}

Callers 1

ParseRecipientsFunction · 0.70

Calls 2

ParseHybridRecipientFunction · 0.85
ParseX25519RecipientFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…