MCPcopy Index your code
hub / github.com/openflagr/flagr / ErrorMessage

Function ErrorMessage

pkg/handler/error.go:32–36  ·  view source on GitHub ↗

ErrorMessage generates error messages

(s string, data ...any)

Source from the content-addressed store, hash-verified

30
31// ErrorMessage generates error messages
32func ErrorMessage(s string, data ...any) *models.Error {
33 return &models.Error{
34 Message: new(fmt.Sprintf(s, data...)),
35 }
36}
37
38// flagKeyUniqueViolation reports whether err is a DB unique violation on flags.key (idx_flag_key).
39func flagKeyUniqueViolation(err error) bool {

Callers 15

export.goFile · 0.85
DuplicateFlagMethod · 0.85
PostExposuresMethod · 0.85
PostEvaluationMethod · 0.85
PostEvaluationBatchMethod · 0.85
FindFlagsMethod · 0.85
GetFlagMethod · 0.85
GetFlagSnapshotsMethod · 0.85
GetFlagEntityTypesMethod · 0.85
PutFlagMethod · 0.85
SetFlagEnabledStateMethod · 0.85
RestoreFlagMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestErrorMessageFunction · 0.68