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

Method run

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

Source from the content-addressed store, hash-verified

31}
32
33func (c *seenCommand) run(cmd *cobra.Command, args []string) error {
34 if err := requireAuth(); err != nil {
35 return err
36 }
37
38 ids, err := parseIntArgs(args)
39 if err != nil {
40 return err
41 }
42
43 if err := sdk.Postings().MarkSeen(cmd.Context(), ids); err != nil {
44 return convertSDKError(err)
45 }
46
47 summary := fmt.Sprintf("%d posting(s) marked as seen", len(ids))
48
49 if writer.IsStyled() {
50 fmt.Fprintln(cmd.OutOrStdout(), summary+".")
51 return nil
52 }
53
54 return writeOK(nil, output.WithSummary(summary))
55}
56
57// unseen
58

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