Documentation
¶
Overview ¶
Package shared holds helpers used across webhook subcommands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseEvents ¶
ParseEvents splits a comma-separated string of event keys into a deduped, trimmed slice. Empty entries (e.g. trailing commas) are skipped. Returns nil for an empty input so callers can rely on len(out)==0.
func WebhookActiveColor ¶ added in v1.17.0
WebhookActiveColor maps a webhook's Active boolean (rendered as "true" or "false" by fmt.Sprintf("%v", ...)) to a color. Active webhooks are green (live, will fire) and inactive ones red (silent until re-enabled). This helper takes the already-formatted string because that's what format.Field.ColorFunc receives.
func WebhookFields ¶
WebhookFields constructs the formatter shared by `webhook list` and `webhook view` so JSON field names and TTY columns stay in lock step.
Types ¶
This section is empty.