From 6775ecaf139ef687b5922fbf8e621745de7d0bb6 Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Sun, 26 Jan 2014 14:28:35 +0800 Subject: [PATCH] delete unused callbacks/create.go --- callbacks/create.go | 21 --------------------- scope.go | 2 -- 2 files changed, 23 deletions(-) delete mode 100644 callbacks/create.go diff --git a/callbacks/create.go b/callbacks/create.go deleted file mode 100644 index 390a1ad0..00000000 --- a/callbacks/create.go +++ /dev/null @@ -1,21 +0,0 @@ -package callbacks - -import "github.com/jinzhu/gorm" - -func Create(scope *gorm.Scope) { -} - -func init() { - gorm.DefaultCallback.Create().Before().Register(Create) -} - -func init() { - DefaultCallback.Create().Before("Delete").After("Lalala").Register("delete", Delete) - DefaultCallback.Update().Before("Delete").After("Lalala").Remove("replace", Delete) - DefaultCallback.Delete().Before("Delete").After("Lalala").Replace("replace", Delete) - DefaultCallback.Query().Before("Delete").After("Lalala").Replace("replace", Delete) -} - -// Scope -// HasError(), HasColumn(), CallMethod(), Raw(), Exec() -// TableName(), CombinedQuerySQL() diff --git a/scope.go b/scope.go index a387248f..0affd78f 100644 --- a/scope.go +++ b/scope.go @@ -86,8 +86,6 @@ func (scope *Scope) CallMethod(name string) { } else { scope.Err(errors.New(fmt.Sprintf("unsupported function %v", name))) } - } else { - scope.Err(errors.New(fmt.Sprintf("no valid function %v found", name))) } }