From 0329b800b0d174009fba5acd2d6e2603ae566dbb Mon Sep 17 00:00:00 2001 From: Burak Demirpolat <44942068+bdemirpolat@users.noreply.github.com> Date: Tue, 13 Jul 2021 11:38:44 +0300 Subject: [PATCH] slightly better callback warning (#4495) --- schema/schema.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/schema.go b/schema/schema.go index 8ade2ed7..4d5b7346 100644 --- a/schema/schema.go +++ b/schema/schema.go @@ -228,7 +228,7 @@ func Parse(dest interface{}, cacheStore *sync.Map, namer Namer) (*Schema, error) case "func(*gorm.DB) error": // TODO hack reflect.Indirect(reflect.ValueOf(schema)).FieldByName(name).SetBool(true) default: - logger.Default.Warn(context.Background(), "Model %v don't match %vInterface, should be %v(*gorm.DB)", schema, name, name) + logger.Default.Warn(context.Background(), "Model %v don't match %vInterface, should be `%v(*gorm.DB) error`. Please see https://gorm.io/docs/hooks.html", schema, name, name) } } }