Documentation ¶
Overview ¶
Package usertext generates messages for users (humans) using Go templating system.
Naturally, most of these are sent in case of errors.
Index ¶
- Constants
- func FormatCLError(ctx context.Context, reason *changelist.CLError, cl *changelist.CL, ...) error
- func OnRunStarted(mode run.Mode) string
- func OnRunStartedGerritMessage(r *run.Run, cfg *prjcfg.ConfigGroup, env *common.Env) string
- func SFormatCLError(ctx context.Context, reason *changelist.CLError, cl *changelist.CL, ...) (string, error)
Constants ¶
const StoppedRun = "CV stopped processing the Run"
StoppedRun is the default message put in the reason of the attention set change when CV stops a run.
Ideally, modules set the message with the reason of the stop so that users are given more detailed info for the reason of the attention set changes that they received a notification for.
TODO(crbug/1251469) - find if this is still needed, once all the places are update to specify the reason of cancellation.
Variables ¶
This section is empty.
Functions ¶
func FormatCLError ¶
func FormatCLError(ctx context.Context, reason *changelist.CLError, cl *changelist.CL, mode run.Mode, sb *strings.Builder) error
FormatCLError formats 1 CL error by writing it into strings.Builder.
mode should be specified if known.
func OnRunStarted ¶
OnRunStarted generates a starting message for humans.
func OnRunStartedGerritMessage ¶
OnRunStartedGerritMessage generates a starting message to be posted on each of the Gerrit CLs involved in the Run.
func SFormatCLError ¶
func SFormatCLError(ctx context.Context, reason *changelist.CLError, cl *changelist.CL, mode run.Mode) (string, error)
SFormatCLError is the same as FormatCLError but returns a string.
Types ¶
This section is empty.