diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-04-11 20:18:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-11 20:18:05 +0800 |
commit | 41f56ad05d12520bb90f91889fa979465d0b3d6b (patch) | |
tree | 1ec7bc62a427ec2da011e882c61f2bfe04adef37 /internal/db/errors | |
parent | 76bb647d2437dbdea86ac1a0caf5d768ab924e18 (diff) |
login_source: migrate to GORM and add tests (#6090)
* Use GORM in all write paths
* Migrate to GORM
* Fix lint errors
* Use GORM to init table
* dbutil: make writer detect error
* Add more tests
* Rename to clearTables
* db: finish adding tests
* osutil: add tests
* Fix load source files path
Diffstat (limited to 'internal/db/errors')
-rw-r--r-- | internal/db/errors/login_source.go | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/internal/db/errors/login_source.go b/internal/db/errors/login_source.go index 876a0820..db0cd1f9 100644 --- a/internal/db/errors/login_source.go +++ b/internal/db/errors/login_source.go @@ -6,19 +6,6 @@ package errors import "fmt" -type LoginSourceNotExist struct { - ID int64 -} - -func IsLoginSourceNotExist(err error) bool { - _, ok := err.(LoginSourceNotExist) - return ok -} - -func (err LoginSourceNotExist) Error() string { - return fmt.Sprintf("login source does not exist [id: %d]", err.ID) -} - type LoginSourceNotActivated struct { SourceID int64 } @@ -44,4 +31,3 @@ func IsInvalidLoginSourceType(err error) bool { func (err InvalidLoginSourceType) Error() string { return fmt.Sprintf("invalid login source type [type: %v]", err.Type) } - |