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

Method run

internal/cmd/seen.go:80–102  ·  view source on GitHub ↗
(cmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

78}
79
80func (c *unseenCommand) run(cmd *cobra.Command, args []string) error {
81 if err := requireAuth(); err != nil {
82 return err
83 }
84
85 ids, err := parseIntArgs(args)
86 if err != nil {
87 return err
88 }
89
90 if err := sdk.Postings().MarkUnseen(cmd.Context(), ids); err != nil {
91 return convertSDKError(err)
92 }
93
94 summary := fmt.Sprintf("%d posting(s) marked as unseen", len(ids))
95
96 if writer.IsStyled() {
97 fmt.Fprintln(cmd.OutOrStdout(), summary+".")
98 return nil
99 }
100
101 return writeOK(nil, output.WithSummary(summary))
102}
103
104func parseIntArgs(args []string) ([]int64, error) {
105 ids := make([]int64, 0, len(args))

Callers

nothing calls this directly

Calls 6

WithSummaryFunction · 0.92
requireAuthFunction · 0.85
parseIntArgsFunction · 0.85
convertSDKErrorFunction · 0.85
writeOKFunction · 0.85
IsStyledMethod · 0.80

Tested by

no test coverage detected