MCPcopy Create free account
hub / github.com/basecamp/hey-cli / parseAddresses

Function parseAddresses

internal/cmd/compose.go:108–120  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

106 bcc := parseAddresses(c.bcc)
107 if len(to)+len(cc)+len(bcc) == 0 {
108 return output.ErrUsage("a message needs at least one recipient (to, cc or bcc)")
109 }
110 messageWithAttachments, attachErr := attachFiles(ctx, message, c.attachments)
111 if attachErr != nil {
112 return attachErr
113 }
114 if err := sdk.Messages().Create(ctx, c.subject, messageWithAttachments, to, cc, bcc); err != nil {
115 return convertSDKError(err)
116 }
117 }
118
119 summary := sentWithAttachmentsSummary("Message sent", len(c.attachments))
120 if writer.IsStyled() {
121 fmt.Fprintln(cmd.OutOrStdout(), summary+".")
122 return nil
123 }

Callers 2

TestParseAddressesFunction · 0.85
runMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestParseAddressesFunction · 0.68