3
0

Fixed typos across the codebase (can not, cannot)

This commit is contained in:
Denis Arh
2021-03-17 17:25:05 +01:00
parent a848c7d0b8
commit 79ed77a379
94 changed files with 117 additions and 118 deletions
+2 -2
View File
@@ -170,7 +170,7 @@ func New(ctx context.Context, log *zap.Logger, s store.Storer, opt options.AuthO
if len(opt.AssetsPath) > 0 {
tplLoader = func(t *template.Template) (tpl *template.Template, err error) {
if tpl, err = t.Clone(); err != nil {
return nil, fmt.Errorf("can not clone templates: %w", err)
return nil, fmt.Errorf("cannot clone templates: %w", err)
} else {
return tpl.ParseGlob(opt.AssetsPath + "/templates/*.tpl")
}
@@ -185,7 +185,7 @@ func New(ctx context.Context, log *zap.Logger, s store.Storer, opt options.AuthO
log.Info("initializing templates without reloading (production mode)")
tpls, err = NewStaticTemplates(tplBase, tplLoader)
if err != nil {
return nil, fmt.Errorf("can not load templates: %w", err)
return nil, fmt.Errorf("cannot load templates: %w", err)
}
} else {
log.Info("initializing reloadable templates (development mode)")
+2 -3
View File
@@ -91,15 +91,14 @@ func (h AuthHandlers) oauth2AuthorizeClient(req *request.AuthReq) (err error) {
req.RedirectTo = GetLinks().Profile
req.NewAlerts = append(req.NewAlerts, request.Alert{
Type: "danger",
Text: fmt.Sprintf("Can not authorize '%s', no permissions.", req.Client),
Text: fmt.Sprintf("cannot authorize '%s', no permissions.", req.Client),
})
return nil
}
if !req.AuthUser.User.EmailConfirmed {
req.Data["invalidUser"] = template.HTML(fmt.Sprintf(
`Can not continue with unauthorized email,
visit <a href="%s">your profile</a> and resolve the issue.`,
`Cannot continue with unauthorized email, visit <a href="%s">your profile</a> and resolve the issue.`,
GetLinks().Profile,
))
@@ -74,7 +74,7 @@ func (h httpRequestHandler) makeRequest(ctx context.Context, args *httpRequestSe
if len(args.Form) > 0 {
if args.Body != nil {
return fmt.Errorf("can not not use form and body parameters at the same time")
return fmt.Errorf("cannot not use form and body parameters at the same time")
}
if !args.hasHeaderContentType {
+1 -1
View File
@@ -159,7 +159,7 @@ func (svc *session) Start(g *wfexec.Graph, i auth.Identifiable, ssp types.Sessio
case 0:
return nil, errors.InvalidData("could not find starting step")
default:
return nil, errors.InvalidData("can not start workflow session multiple starting steps found")
return nil, errors.InvalidData("cannot start workflow session multiple starting steps found")
}
} else if start = g.StepByID(ssp.StepID); start == nil {
return nil, errors.InvalidData("trigger staring step references nonexisting step")
+1 -1
View File
@@ -136,7 +136,7 @@ func (set *Stacktrace) Scan(value interface{}) error {
case []uint8:
b := value.([]byte)
if err := json.Unmarshal(b, set); err != nil {
return fmt.Errorf("can not scan '%v' into Stacktrace: %w", string(b), err)
return fmt.Errorf("cannot scan '%v' into Stacktrace: %w", string(b), err)
}
}
+2 -2
View File
@@ -107,7 +107,7 @@ func (vv *WorkflowStepSet) Scan(value interface{}) error {
case []uint8:
b := value.([]byte)
if err := json.Unmarshal(b, vv); err != nil {
return fmt.Errorf("can not scan '%v' into WorkflowStepSet: %w", string(b), err)
return fmt.Errorf("cannot scan '%v' into WorkflowStepSet: %w", string(b), err)
}
}
@@ -131,7 +131,7 @@ func (vv *WorkflowPathSet) Scan(value interface{}) error {
case []uint8:
b := value.([]byte)
if err := json.Unmarshal(b, vv); err != nil {
return fmt.Errorf("can not scan '%v' into WorkflowPathSet: %w", string(b), err)
return fmt.Errorf("cannot scan '%v' into WorkflowPathSet: %w", string(b), err)
}
}
+2 -2
View File
@@ -97,7 +97,7 @@ func (vv *TriggerConstraintSet) Scan(value interface{}) error {
case []uint8:
b := value.([]byte)
if err := json.Unmarshal(b, vv); err != nil {
return fmt.Errorf("can not scan '%v' into TriggerConstraintSet: %w", string(b), err)
return fmt.Errorf("cannot scan '%v' into TriggerConstraintSet: %w", string(b), err)
}
}
@@ -112,7 +112,7 @@ func (vv *TriggerMeta) Scan(value interface{}) error {
case []uint8:
b := value.([]byte)
if err := json.Unmarshal(b, vv); err != nil {
return fmt.Errorf("can not scan '%v' into TriggerMeta: %w", string(b), err)
return fmt.Errorf("cannot scan '%v' into TriggerMeta: %w", string(b), err)
}
}
+3 -3
View File
@@ -87,7 +87,7 @@ func (r *Workflow) RBACResource() rbac.Resource {
// CheckDeferred returns true if any of the steps is deferred.
//
// Workflow is considered deferred when delay or prompt step types are used.
// Deferred workflows can not short-circuit triggers or prevent creation/update on before triggers
// Deferred workflows cannot short-circuit triggers or prevent creation/update on before triggers
//
// @todo add flag on workflow to explicitly mark workflow as deferred even when there are no delay or prompt steps
func (r Workflow) CheckDeferred() bool {
@@ -102,7 +102,7 @@ func (vv *WorkflowMeta) Scan(value interface{}) error {
case []uint8:
b := value.([]byte)
if err := json.Unmarshal(b, vv); err != nil {
return fmt.Errorf("can not scan '%v' into WorkflowMeta: %w", string(b), err)
return fmt.Errorf("cannot scan '%v' into WorkflowMeta: %w", string(b), err)
}
}
@@ -131,7 +131,7 @@ func (set *WorkflowIssueSet) Scan(value interface{}) error {
case []uint8:
b := value.([]byte)
if err := json.Unmarshal(b, set); err != nil {
return fmt.Errorf("can not scan '%v' into WorkflowIssueSet: %w", string(b), err)
return fmt.Errorf("cannot scan '%v' into WorkflowIssueSet: %w", string(b), err)
}
}
+1 -1
View File
@@ -1113,7 +1113,7 @@ endpoints:
title: Filter by event type
- name: excludeInvalid
type: bool
title: Exclude scripts that can not be used (errors)
title: Exclude scripts that cannot be used (errors)
- name: excludeClientScripts
type: bool
title: Do not include client scripts
+1 -1
View File
@@ -51,7 +51,7 @@ type (
// ExcludeInvalid GET parameter
//
// Exclude scripts that can not be used (errors)
// Exclude scripts that cannot be used (errors)
ExcludeInvalid bool
// ExcludeClientScripts GET parameter
+1 -1
View File
@@ -381,7 +381,7 @@ func (svc attachment) create(name string, size int64, fh io.ReadSeeker, att *typ
}
if svc.objects == nil {
return errors.New("can not create attachment: store handler not set")
return errors.New("cannot create attachment: store handler not set")
}
aProps.setName(name)
+1 -1
View File
@@ -370,7 +370,7 @@ func NotificationErrNoRecipients(mm ...*notificationActionProps) *errors.Error {
var e = errors.New(
errors.KindInternal,
p.Format("can not send email message without recipients", nil),
p.Format("cannot send email message without recipients", nil),
errors.Meta("type", "noRecipients"),
errors.Meta("resource", "compose:notification"),
+1 -1
View File
@@ -38,7 +38,7 @@ errors:
message: "invalid recipient format ({recipient})"
- error: noRecipients
message: "can not send email message without recipients"
message: "cannot send email message without recipients"
- error: failedToDownloadAttachment
message: "could not download attachment from {attachmentURL}: {err}"
+4 -4
View File
@@ -1004,7 +1004,7 @@ func (svc record) Organize(ctx context.Context, namespaceID, moduleID, recordID
}
// Check field existence and permissions
// check if numeric -- we can not reorder on any other field type
// check if numeric -- we cannot reorder on any other field type
sf := m.Fields.FindByName(posField)
if sf == nil {
@@ -1012,11 +1012,11 @@ func (svc record) Organize(ctx context.Context, namespaceID, moduleID, recordID
}
if !sf.IsNumeric() {
return fmt.Errorf("can not reorder on non numeric field %q", posField)
return fmt.Errorf("cannot reorder on non numeric field %q", posField)
}
if sf.Multi {
return fmt.Errorf("can not reorder on multi-value field %q", posField)
return fmt.Errorf("cannot reorder on multi-value field %q", posField)
}
if !svc.ac.CanUpdateRecordValue(ctx, sf) {
@@ -1040,7 +1040,7 @@ func (svc record) Organize(ctx context.Context, namespaceID, moduleID, recordID
}
if vf.Multi {
return fmt.Errorf("can not update multi-value field %q", posField)
return fmt.Errorf("cannot update multi-value field %q", posField)
}
if !svc.ac.CanUpdateRecordValue(ctx, vf) {
+1 -1
View File
@@ -200,7 +200,7 @@ func RegisterIteratorProviders() {
var limit uint
if lString, has := f["limit"]; has {
if limit64, err := strconv.ParseUint(lString, 10, 32); err != nil {
return fmt.Errorf("can not parse iterator limit param: %w", err)
return fmt.Errorf("cannot parse iterator limit param: %w", err)
} else {
// We specify the bit size during parsing, so this is fine
limit = uint(limit64)
+1 -1
View File
@@ -106,7 +106,7 @@ func (meta *attachmentMeta) Scan(value interface{}) error {
*meta = attachmentMeta{}
case []uint8:
if err := json.Unmarshal(value.([]byte), meta); err != nil {
return errors.Wrapf(err, "Can not scan '%v' into attachmentMeta", value)
return errors.Wrapf(err, "cannot scan '%v' into attachmentMeta", value)
}
}
+1 -1
View File
@@ -94,7 +94,7 @@ func (cc *ChartConfig) Scan(value interface{}) error {
case []uint8:
b := value.([]byte)
if err := json.Unmarshal(b, cc); err != nil {
return errors.Wrapf(err, "Can not scan '%v' into ChartConfig", string(b))
return errors.Wrapf(err, "cannot scan '%v' into ChartConfig", string(b))
}
}
+1 -1
View File
@@ -33,7 +33,7 @@ func (opt *ModuleFieldExpr) Scan(value interface{}) error {
case []uint8:
b := value.([]byte)
if err := json.Unmarshal(b, opt); err != nil {
return fmt.Errorf("Can not scan '%v' into ModuleFieldExpr: %v", string(b), err)
return fmt.Errorf("cannot scan '%v' into ModuleFieldExpr: %v", string(b), err)
}
}
+1 -1
View File
@@ -31,7 +31,7 @@ func (opt *ModuleFieldOptions) Scan(value interface{}) error {
case []uint8:
b := value.([]byte)
if err := json.Unmarshal(b, opt); err != nil {
return errors.Wrapf(err, "Can not scan '%v' into ModuleFieldOptions", string(b))
return errors.Wrapf(err, "cannot scan '%v' into ModuleFieldOptions", string(b))
}
}
+1 -1
View File
@@ -94,7 +94,7 @@ func (nm *NamespaceMeta) Scan(value interface{}) error {
case []uint8:
b := value.([]byte)
if err := json.Unmarshal(b, nm); err != nil {
return errors.Wrapf(err, "Can not scan '%v' into NamespaceMeta", string(b))
return errors.Wrapf(err, "cannot scan '%v' into NamespaceMeta", string(b))
}
}
+1 -1
View File
@@ -113,7 +113,7 @@ func (bb *PageBlocks) Scan(value interface{}) error {
case []uint8:
b := value.([]byte)
if err := json.Unmarshal(b, bb); err != nil {
return errors.Wrapf(err, "Can not scan '%v' into PageBlocks", string(b))
return errors.Wrapf(err, "cannot scan '%v' into PageBlocks", string(b))
}
}
+1 -1
View File
@@ -274,7 +274,7 @@ func (set *RecordValueSet) Scan(value interface{}) error {
*set = RecordValueSet{}
case []uint8:
if err := json.Unmarshal(value.([]byte), set); err != nil {
return errors.Wrapf(err, "Can not scan '%v' into RecordValueSet", value)
return errors.Wrapf(err, "cannot scan '%v' into RecordValueSet", value)
}
}
+1 -1
View File
@@ -1902,7 +1902,7 @@ paths:
items: *ref_0
- in: query
name: excludeInvalid
description: Exclude scripts that can not be used (errors)
description: Exclude scripts that cannot be used (errors)
required: false
schema: *ref_15
- in: query
+1 -1
View File
@@ -1904,7 +1904,7 @@ paths:
items: *ref_1
- in: query
name: excludeInvalid
description: Exclude scripts that can not be used (errors)
description: Exclude scripts that cannot be used (errors)
required: false
schema: *ref_13
- in: query
+1 -1
View File
@@ -42,7 +42,7 @@ func (list *ModuleFieldSet) Scan(value interface{}) error {
*list = ModuleFieldSet{}
case []uint8:
if err := json.Unmarshal(value.([]byte), list); err != nil {
return errors.New(fmt.Sprintf("Can not scan '%v' into ModuleFieldSet", value))
return errors.New(fmt.Sprintf("cannot scan '%v' into ModuleFieldSet", value))
}
}
+1 -1
View File
@@ -53,7 +53,7 @@ func (list *ModuleFieldMappingSet) Scan(value interface{}) error {
*list = ModuleFieldMappingSet{}
case []uint8:
if err := json.Unmarshal(value.([]byte), list); err != nil {
return errors.New(fmt.Sprintf("Can not scan '%v' into ModuleFieldMappingSet", value))
return errors.New(fmt.Sprintf("cannot scan '%v' into ModuleFieldMappingSet", value))
}
}
+1 -1
View File
@@ -47,7 +47,7 @@ func (s server) Serve(ctx context.Context) {
listener, err := net.Listen("tcp", s.httpOpt.Addr)
if err != nil {
s.log.Error("can not start server", zap.Error(err))
s.log.Error("cannot start server", zap.Error(err))
return
}
+1 -1
View File
@@ -39,7 +39,7 @@ func (s server) WaitFor(ctx context.Context) {
// Setup a simple HTTP server that will inform the impatient users
listener, err := net.Listen("tcp", s.httpOpt.Addr)
if err != nil {
s.log.Error("Can not start server", zap.Error(err))
s.log.Error("cannot start server", zap.Error(err))
os.Exit(1)
}
defer listener.Close()
+2 -2
View File
@@ -692,7 +692,7 @@ func (s Store) collect{{ export $.Types.Singular }}CursorValues({{ template "ext
// check{{ export $.Types.Singular }}Constraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) check{{ export $.Types.Singular }}Constraints(ctx context.Context{{ template "extraArgsDef" $ }}, res *{{ $.Types.GoType }}) error {
// Consider resource valid when all fields in unique constraint check lookups
@@ -709,7 +709,7 @@ func (s *Store) check{{ export $.Types.Singular }}Constraints(ctx context.Contex
{{ else if eq .Type "string" }}
valid = valid && len(res.{{ .Field }}) > 0
{{ else }}
// can not check field {{ .Field }} with unsupported type: {{ .Type }}
// cannot check field {{ .Field }} with unsupported type: {{ .Type }}
{{ end }}
{{- end }}
{{- end }}
+1 -1
View File
@@ -565,7 +565,7 @@ func (svc *service) processIterator(script *Script) (ptr uintptr, err error) {
}
if script.Security == nil {
return 0, fmt.Errorf("can not schedule iterator without security descriptor")
return 0, fmt.Errorf("cannot schedule iterator without security descriptor")
}
if p := strings.Index(i.ResourceType, ":"); p > 0 {
+3 -3
View File
@@ -42,11 +42,11 @@ func mapExplicitTriggers(script *ServerScript) map[string]bool {
// converts trigger's constraint to eventbus' constraint options
func triggerToHandlerOps(t *Trigger) (oo []eventbus.HandlerRegOp, err error) {
if len(t.ResourceTypes) == 0 {
return nil, fmt.Errorf("can not generate event handler without at least one resource")
return nil, fmt.Errorf("cannot generate event handler without at least one resource")
}
if len(t.EventTypes) == 0 {
return nil, fmt.Errorf("can not generate event handler without at least one events")
return nil, fmt.Errorf("cannot generate event handler without at least one events")
}
// Make a copy of event types slice so that we do not modify it
@@ -73,7 +73,7 @@ func triggerToHandlerOps(t *Trigger) (oo []eventbus.HandlerRegOp, err error) {
func constraintsToHandlerOps(cc []*TConstraint) (oo []eventbus.HandlerRegOp, err error) {
for _, raw := range cc {
if c, err := eventbus.ConstraintMaker(raw.Name, raw.Op, raw.Value...); err != nil {
return nil, errors.Wrap(err, "can not generate constraints")
return nil, errors.Wrap(err, "cannot generate constraints")
} else {
oo = append(oo, eventbus.Constraint(c))
}
+2 -2
View File
@@ -52,7 +52,7 @@ func Decode(ctx context.Context, p string, decoders ...Decoder) ([]resource.Inte
for _, d := range decoders {
if !d.CanDecodeFile(f) {
// decoder can not handle this file
// decoder cannot handle this file
// Make sure to reset it, as the above check consumes the reader
if _, err = f.Seek(0, 0); err != nil {
return err
@@ -62,7 +62,7 @@ func Decode(ctx context.Context, p string, decoders ...Decoder) ([]resource.Inte
}
if !d.CanDecodeExt(info.Name()) {
// this decoder can not handle this extension
// this decoder cannot handle this extension
continue
}
+2 -2
View File
@@ -93,7 +93,7 @@ func Assign(base TypedValue, path string, val interface{}) error {
}
default:
return fmt.Errorf("can not set value on %s with path '%s'", base.Type(), path)
return fmt.Errorf("cannot set value on %s with path '%s'", base.Type(), path)
}
}
@@ -134,7 +134,7 @@ func Select(base TypedValue, path string) (TypedValue, error) {
}
var (
failure = fmt.Errorf("can not get value from %s with path '%s'", base.Type(), path)
failure = fmt.Errorf("cannot get value from %s with path '%s'", base.Type(), path)
key string
)
+2 -2
View File
@@ -50,11 +50,11 @@ func (t Unresolved) Type() string { return t.typ }
// Casts value to interface{}
func (Unresolved) Cast(interface{}) (TypedValue, error) {
return nil, fmt.Errorf("can not cast to unresolved type")
return nil, fmt.Errorf("cannot cast to unresolved type")
}
func (t *Unresolved) Assign(interface{}) (err error) {
return fmt.Errorf("can not set on unresolved type")
return fmt.Errorf("cannot set on unresolved type")
}
func CastToAny(val interface{}) (interface{}, error) {
+1 -1
View File
@@ -218,7 +218,7 @@ func (t *Vars) Scan(value interface{}) error {
case []uint8:
b := value.([]byte)
if err := json.Unmarshal(b, t); err != nil {
return fmt.Errorf("can not scan '%v' into %T: %w", string(b), t, err)
return fmt.Errorf("cannot scan '%v' into %T: %w", string(b), t, err)
}
}
+1 -1
View File
@@ -44,7 +44,7 @@ func oidcAutoDiscovery(ctx context.Context, log *zap.Logger, opt options.AuthOpt
// because we do not want to override the provider every time the system restarts
//
// validate: false
// because at the initial (empty db) start, we can not actually validate (server is not yet up)
// because at the initial (empty db) start, we cannot actually validate (server is not yet up)
//
// enable: true
// we want provider & the entire external auth to be validated
+1 -1
View File
@@ -24,7 +24,7 @@ func Run(ctx context.Context, log *zap.Logger, s store.Storer, provisionOpt opti
// Config (full & partial)
func() error { return importConfig(ctx, log, s, provisionOpt.Path) },
// Auto-discoveries and other parts that can not be imported from static files
// Auto-discoveries and other parts that cannot be imported from static files
func() error { return authSettingsAutoDiscovery(ctx, log, service.DefaultSettings) },
func() error { return authAddExternals(ctx, log) },
func() error { return service.DefaultSettings.UpdateCurrent(ctx) },
+1 -1
View File
@@ -16,7 +16,7 @@ const (
func (r Resource) append(suffix string) Resource {
if !r.IsAppendable() {
panic("can not append to non appendable resource '" + r.String() + "'")
panic("cannot append to non appendable resource '" + r.String() + "'")
}
return Resource(r.String() + suffix)
+1 -1
View File
@@ -223,7 +223,7 @@ func (s *Session) Exec(ctx context.Context, step Step, scope *expr.Vars) error {
}
if len(s.g.Parents(step)) > 0 {
return fmt.Errorf("can not execute step with parents")
return fmt.Errorf("cannot execute step with parents")
}
if scope == nil {
+5 -5
View File
@@ -7541,7 +7541,7 @@ modules:
expressions:
validators:
- test: "value < 0"
error: Discount can not be a negative number
error: Discount cannot be a negative number
Email:
label: Email
kind: Email
@@ -8616,7 +8616,7 @@ modules:
expressions:
validators:
- test: "value < 0"
error: Shipping and Handling can not be a negative number
error: Shipping and Handling cannot be a negative number
Status:
label: Status
@@ -8650,7 +8650,7 @@ modules:
expressions:
validators:
- test: "value < 0"
error: Sub total can not be a negative number
error: Sub total cannot be a negative number
Tax:
label: Tax
kind: Number
@@ -8661,7 +8661,7 @@ modules:
expressions:
validators:
- test: "value < 0"
error: Tax can not be a negative number
error: Tax cannot be a negative number
TotalPrice:
label: Total Price (calculated)
kind: Number
@@ -8949,7 +8949,7 @@ modules:
format: "0"
precision: 2
ScoreCriticality:
label:
label:
kind: Number
options:
format: "0"
+1 -1
View File
@@ -55,7 +55,7 @@ func Connect(ctx context.Context, dsn string) (store.Storer, error) {
func (s *Store) Upgrade(ctx context.Context, log *zap.Logger) (err error) {
if err = (&rdbms.Schema{}).Upgrade(ctx, NewUpgrader(log, s)); err != nil {
return fmt.Errorf("can not upgrade postgresql schema: %w", err)
return fmt.Errorf("cannot upgrade postgresql schema: %w", err)
}
return nil
+1 -1
View File
@@ -200,7 +200,7 @@ func (s Store) internalActionlogEncoder(res *actionlog.Action) store.Payload {
// checkActionlogConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkActionlogConstraints(ctx context.Context, res *actionlog.Action) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -582,7 +582,7 @@ func (s Store) collectApplicationCursorValues(res *types.Application, cc ...*fil
// checkApplicationConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkApplicationConstraints(ctx context.Context, res *types.Application) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -331,7 +331,7 @@ func (s Store) internalAttachmentEncoder(res *types.Attachment) store.Payload {
// checkAttachmentConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkAttachmentConstraints(ctx context.Context, res *types.Attachment) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -620,7 +620,7 @@ func (s Store) collectAuthClientCursorValues(res *types.AuthClient, cc ...*filte
// checkAuthClientConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkAuthClientConstraints(ctx context.Context, res *types.AuthClient) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -301,7 +301,7 @@ func (s Store) internalAuthConfirmedClientEncoder(res *types.AuthConfirmedClient
// checkAuthConfirmedClientConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkAuthConfirmedClientConstraints(ctx context.Context, res *types.AuthConfirmedClient) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -271,7 +271,7 @@ func (s Store) internalAuthOa2tokenEncoder(res *types.AuthOa2token) store.Payloa
// checkAuthOa2tokenConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkAuthOa2tokenConstraints(ctx context.Context, res *types.AuthOa2token) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -310,7 +310,7 @@ func (s Store) internalAuthSessionEncoder(res *types.AuthSession) store.Payload
// checkAuthSessionConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkAuthSessionConstraints(ctx context.Context, res *types.AuthSession) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -578,7 +578,7 @@ func (s Store) collectAutomationSessionCursorValues(res *types.Session, cc ...*f
// checkAutomationSessionConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkAutomationSessionConstraints(ctx context.Context, res *types.Session) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -584,7 +584,7 @@ func (s Store) collectAutomationTriggerCursorValues(res *types.Trigger, cc ...*f
// checkAutomationTriggerConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkAutomationTriggerConstraints(ctx context.Context, res *types.Trigger) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -621,7 +621,7 @@ func (s Store) collectAutomationWorkflowCursorValues(res *types.Workflow, cc ...
// checkAutomationWorkflowConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkAutomationWorkflowConstraints(ctx context.Context, res *types.Workflow) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -334,7 +334,7 @@ func (s Store) internalComposeAttachmentEncoder(res *types.Attachment) store.Pay
// checkComposeAttachmentConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkComposeAttachmentConstraints(ctx context.Context, res *types.Attachment) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -590,7 +590,7 @@ func (s Store) collectComposeChartCursorValues(res *types.Chart, cc ...*filter.S
// checkComposeChartConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkComposeChartConstraints(ctx context.Context, res *types.Chart) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -340,7 +340,7 @@ func (s Store) internalComposeModuleFieldEncoder(res *types.ModuleField) store.P
// checkComposeModuleFieldConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkComposeModuleFieldConstraints(ctx context.Context, res *types.ModuleField) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -600,7 +600,7 @@ func (s Store) collectComposeModuleCursorValues(res *types.Module, cc ...*filter
// checkComposeModuleConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkComposeModuleConstraints(ctx context.Context, res *types.Module) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -11,7 +11,7 @@ func (s Store) convertComposeModuleFieldFilter(f types.ModuleFieldFilter) (query
query = s.composeModuleFieldsSelectBuilder()
if len(f.ModuleID) == 0 {
err = fmt.Errorf("can not search for module fields without module IDs")
err = fmt.Errorf("cannot search for module fields without module IDs")
return
}
+1 -1
View File
@@ -589,7 +589,7 @@ func (s Store) collectComposeNamespaceCursorValues(res *types.Namespace, cc ...*
// checkComposeNamespaceConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkComposeNamespaceConstraints(ctx context.Context, res *types.Namespace) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -611,7 +611,7 @@ func (s Store) collectComposePageCursorValues(res *types.Page, cc ...*filter.Sor
// checkComposePageConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkComposePageConstraints(ctx context.Context, res *types.Page) error {
// Consider resource valid when all fields in unique constraint check lookups
+2 -2
View File
@@ -80,9 +80,9 @@ func (b *recordReportBuilder) Run(ctx context.Context) (ComposeRecordsReport, er
)
if sb, err := b.Build(); err != nil {
return nil, fmt.Errorf("can not generate report query: %w", err)
return nil, fmt.Errorf("cannot generate report query: %w", err)
} else if rows, err := b.store.Query(ctx, sb); err != nil {
return nil, fmt.Errorf("can not execute report query: %w", err)
return nil, fmt.Errorf("cannot execute report query: %w", err)
} else {
err = func() error {
defer rows.Close()
+1 -1
View File
@@ -304,7 +304,7 @@ func (s Store) internalComposeRecordValueEncoder(res *types.RecordValue) store.P
// checkComposeRecordValueConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkComposeRecordValueConstraints(ctx context.Context, _mod *types.Module, res *types.RecordValue) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -465,7 +465,7 @@ func (s Store) internalComposeRecordEncoder(res *types.Record) store.Payload {
// checkComposeRecordConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkComposeRecordConstraints(ctx context.Context, _mod *types.Module, res *types.Record) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -324,7 +324,7 @@ func (s Store) internalCredentialsEncoder(res *types.Credentials) store.Payload
// checkCredentialsConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkCredentialsConstraints(ctx context.Context, res *types.Credentials) error {
// Consider resource valid when all fields in unique constraint check lookups
@@ -575,7 +575,7 @@ func (s Store) collectFederationExposedModuleCursorValues(res *types.ExposedModu
// checkFederationExposedModuleConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkFederationExposedModuleConstraints(ctx context.Context, res *types.ExposedModule) error {
// Consider resource valid when all fields in unique constraint check lookups
@@ -592,7 +592,7 @@ func (s Store) collectFederationModuleMappingCursorValues(res *types.ModuleMappi
// checkFederationModuleMappingConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkFederationModuleMappingConstraints(ctx context.Context, res *types.ModuleMapping) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -358,7 +358,7 @@ func (s Store) internalFederationNodeEncoder(res *types.Node) store.Payload {
// checkFederationNodeConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkFederationNodeConstraints(ctx context.Context, res *types.Node) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -568,7 +568,7 @@ func (s Store) collectFederationNodesSyncCursorValues(res *types.NodeSync, cc ..
// checkFederationNodesSyncConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkFederationNodesSyncConstraints(ctx context.Context, res *types.NodeSync) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -572,7 +572,7 @@ func (s Store) collectFederationSharedModuleCursorValues(res *types.SharedModule
// checkFederationSharedModuleConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkFederationSharedModuleConstraints(ctx context.Context, res *types.SharedModule) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -339,7 +339,7 @@ func (s Store) internalFlagEncoder(res *types.Flag) store.Payload {
// checkFlagConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkFlagConstraints(ctx context.Context, res *types.Flag) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -307,7 +307,7 @@ func (s Store) internalLabelEncoder(res *types.Label) store.Payload {
// checkLabelConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkLabelConstraints(ctx context.Context, res *types.Label) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -295,7 +295,7 @@ func (s Store) internalRbacRuleEncoder(res *rbac.Rule) store.Payload {
// checkRbacRuleConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkRbacRuleConstraints(ctx context.Context, res *rbac.Rule) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -391,7 +391,7 @@ func tx(ctx context.Context, dbCandidate interface{}, cfg *Config, txOpt *sql.Tx
// Call the the configured transaction retry error handler
// if this particular error should be retried or not
//
// We can not generalize here because different store implementation have
// We cannot generalize here because different store implementation have
// different errors and we need to act accordingly
if !cfg.TxRetryErrHandler(try, lastTaskErr) {
return fmt.Errorf("failed to complete transaction: %w", lastTaskErr)
+1 -1
View File
@@ -93,7 +93,7 @@ type (
// Different store backend implementation might handle upsert differently...
UpsertBuilder func(*Config, string, store.Payload, ...string) (squirrel.InsertBuilder, error)
// TriggerHandlers handle various exceptions that can not be handled generally within RDBMS package.
// TriggerHandlers handle various exceptions that cannot be handled generally within RDBMS package.
// see triggerKey type and defined constants to see where the hooks are and how can they be called
TriggerHandlers TriggerHandlers
+1 -1
View File
@@ -593,7 +593,7 @@ func (s Store) collectReminderCursorValues(res *types.Reminder, cc ...*filter.So
// checkReminderConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkReminderConstraints(ctx context.Context, res *types.Reminder) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -290,7 +290,7 @@ func (s Store) internalRoleMemberEncoder(res *types.RoleMember) store.Payload {
// checkRoleMemberConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkRoleMemberConstraints(ctx context.Context, res *types.RoleMember) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -606,7 +606,7 @@ func (s Store) collectRoleCursorValues(res *types.Role, cc ...*filter.SortExpr)
// checkRoleConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkRoleConstraints(ctx context.Context, res *types.Role) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -317,7 +317,7 @@ func (s Store) internalSettingEncoder(res *types.SettingValue) store.Payload {
// checkSettingConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkSettingConstraints(ctx context.Context, res *types.SettingValue) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -605,7 +605,7 @@ func (s Store) collectTemplateCursorValues(res *types.Template, cc ...*filter.So
// checkTemplateConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkTemplateConstraints(ctx context.Context, res *types.Template) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -638,7 +638,7 @@ func (s Store) collectUserCursorValues(res *types.User, cc ...*filter.SortExpr)
// checkUserConstraints performs lookups (on valid) resource to check if any of the values on unique fields
// already exists in the store
//
// Using built-in constraint checking would be more performant but unfortunately we can not rely
// Using built-in constraint checking would be more performant but unfortunately we cannot rely
// on the full support (MySQL does not support conditional indexes)
func (s *Store) checkUserConstraints(ctx context.Context, res *types.User) error {
// Consider resource valid when all fields in unique constraint check lookups
+1 -1
View File
@@ -67,7 +67,7 @@ func ConnectInMemoryWithDebug(ctx context.Context) (s store.Storer, err error) {
func (s *Store) Upgrade(ctx context.Context, log *zap.Logger) (err error) {
if err = (&rdbms.Schema{}).Upgrade(ctx, NewUpgrader(log, s)); err != nil {
return fmt.Errorf("can not upgrade sqlite schema: %w", err)
return fmt.Errorf("cannot upgrade sqlite schema: %w", err)
}
return nil
+1 -1
View File
@@ -1403,7 +1403,7 @@ endpoints:
title: Filter by event type
- name: excludeInvalid
type: bool
title: Exclude scripts that can not be used (errors)
title: Exclude scripts that cannot be used (errors)
- name: excludeClientScripts
type: bool
title: Do not include client scripts
+1 -1
View File
@@ -51,7 +51,7 @@ type (
// ExcludeInvalid GET parameter
//
// Exclude scripts that can not be used (errors)
// Exclude scripts that cannot be used (errors)
ExcludeInvalid bool
// ExcludeClientScripts GET parameter
+1 -1
View File
@@ -147,7 +147,7 @@ func (ctrl User) PartialUpdate(ctx context.Context, r *request.UserPartialUpdate
u.Meta.SecurityPolicy.MFA.EnforcedTOTP, err = cast.ToBoolE(aux)
case "/emailConfirmed":
// unfortunately, this can not be passed to update right now
// unfortunately, this cannot be passed to update right now
// internal limitations
u.EmailConfirmed, err = cast.ToBoolE(aux)
err = ctrl.user.ToggleEmailConfirmation(ctx, u.ID, u.EmailConfirmed)
+1 -1
View File
@@ -207,7 +207,7 @@ func (svc attachment) create(ctx context.Context, name string, size int64, fh io
att.CreatedAt = *now()
if svc.files == nil {
return errors.New("can not create attachment: store handler not set")
return errors.New("cannot create attachment: store handler not set")
}
aaProps.setName(name)
+1 -1
View File
@@ -1038,7 +1038,7 @@ func (svc auth) ConfigureTOTP(ctx context.Context, secret string, code string) (
if i == nil || u.Meta.SecurityPolicy.MFA.EnforcedTOTP {
// TOTP is already enforced on the user,
// this means that we can not just allow the change
// this means that we cannot just allow the change
return AuthErrNotAllowedToConfigureTOTP()
}
+2 -2
View File
@@ -1321,7 +1321,7 @@ func AuthErrEnforcedMFAWithTOTP(mm ...*authActionProps) *errors.Error {
var e = errors.New(
errors.KindInternal,
p.Format("TOTP is enforced and can not be disabled", nil),
p.Format("TOTP is enforced and cannot be disabled", nil),
errors.Meta("type", "enforcedMFAWithTOTP"),
errors.Meta("resource", "system:auth"),
@@ -1441,7 +1441,7 @@ func AuthErrEnforcedMFAWithEmailOTP(mm ...*authActionProps) *errors.Error {
var e = errors.New(
errors.KindInternal,
p.Format("OTP over email is enforced and can not be disabled", nil),
p.Format("OTP over email is enforced and cannot be disabled", nil),
errors.Meta("type", "enforcedMFAWithEmailOTP"),
errors.Meta("resource", "system:auth"),
+2 -2
View File
@@ -164,7 +164,7 @@ errors:
severity: warning
- error: enforcedMFAWithTOTP
message: "TOTP is enforced and can not be disabled"
message: "TOTP is enforced and cannot be disabled"
severity: warning
- error: invalidTOTP
@@ -180,7 +180,7 @@ errors:
severity: warning
- error: enforcedMFAWithEmailOTP
message: "OTP over email is enforced and can not be disabled"
message: "OTP over email is enforced and cannot be disabled"
severity: warning
- error: invalidEmailOTP
+1 -1
View File
@@ -148,7 +148,7 @@ func (svc settings) updateCurrent(ctx context.Context, vv types.SettingValueSet)
return
}
// push message over update chan so we can notify listeners
// push message over update chan so we cannotify listeners
select {
case svc.update <- vv:
case <-ctx.Done():
+1 -1
View File
@@ -282,7 +282,7 @@ var _ KVDecoder = &ExternalAuthProviderSet{}
func (p ExternalAuthProvider) EncodeKV() (vv SettingValueSet, err error) {
if p.Handle == "" {
return nil, errors.New("can not encode external auth provider without handle")
return nil, errors.New("cannot encode external auth provider without handle")
}
var (
prefix = "auth.external.providers." + p.Handle + "."
+1 -1
View File
@@ -95,7 +95,7 @@ func (au *ApplicationUnify) Scan(value interface{}) error {
au = nil
case []uint8:
if err := json.Unmarshal(value.([]byte), au); err != nil {
return errors.Wrapf(err, "Can not scan '%v' into ApplicationUnify", value)
return errors.Wrapf(err, "cannot scan '%v' into ApplicationUnify", value)
}
}
+1 -1
View File
@@ -97,7 +97,7 @@ func (meta *attachmentMeta) Scan(value interface{}) error {
*meta = attachmentMeta{}
case []uint8:
if err := json.Unmarshal(value.([]byte), meta); err != nil {
return errors.Wrapf(err, "Can not scan '%v' into attachmentMeta", value)
return errors.Wrapf(err, "cannot scan '%v' into attachmentMeta", value)
}
}
+2 -2
View File
@@ -165,7 +165,7 @@ func (vv *AuthClientMeta) Scan(value interface{}) error {
case []uint8:
b := value.([]byte)
if err := json.Unmarshal(b, vv); err != nil {
return fmt.Errorf("can not scan '%v' into AuthClientMeta: %w", string(b), err)
return fmt.Errorf("cannot scan '%v' into AuthClientMeta: %w", string(b), err)
}
}
@@ -189,7 +189,7 @@ func (vv *AuthClientSecurity) Scan(value interface{}) error {
case []uint8:
b := value.([]byte)
if err := json.Unmarshal(b, vv); err != nil {
return fmt.Errorf("can not scan '%v' into AuthClientSecurity: %w", string(b), err)
return fmt.Errorf("cannot scan '%v' into AuthClientSecurity: %w", string(b), err)
}
}
+1 -1
View File
@@ -82,7 +82,7 @@ func (t *TemplateMeta) Scan(value interface{}) error {
case []uint8:
b := value.([]byte)
if err := json.Unmarshal(b, t); err != nil {
return errors.Wrapf(err, "Can not scan '%v' into TemplateMeta", string(b))
return errors.Wrapf(err, "cannot scan '%v' into TemplateMeta", string(b))
}
}
+1 -1
View File
@@ -147,7 +147,7 @@ func (meta *UserMeta) Scan(value interface{}) error {
return nil
case []uint8:
if err := json.Unmarshal(value.([]byte), meta); err != nil {
return errors.Wrapf(err, "Can not scan '%v' into User.Meta", value)
return errors.Wrapf(err, "cannot scan '%v' into User.Meta", value)
}
return nil
}
+1 -1
View File
@@ -271,7 +271,7 @@ func TestUserListWithOneAllowed(t *testing.T) {
newUserWeCanAccess := h.createUserWithEmail(h.randEmail())
h.allow(newUserWeCanAccess.RBACResource(), "read")
// And one we can not access
// And one we cannot access
h.createUserWithEmail(h.randEmail())
aux := struct {