mirror of
https://github.com/Li4n0/revsuit.git
synced 2026-09-22 06:40:43 +08:00
Use golint to normalize the code (#1)
This commit is contained in:
@@ -9,5 +9,5 @@ func InitDB(driver, dsn string) (err error) {
|
||||
case "sqlite":
|
||||
DB, err = NewSqlite3(dsn)
|
||||
}
|
||||
return
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ func (f *MapField) Scan(data interface{}) error {
|
||||
return json.Unmarshal(data.([]byte), f)
|
||||
}
|
||||
|
||||
|
||||
type ListField []string
|
||||
|
||||
func (f ListField) Value() (driver.Value, error) {
|
||||
@@ -24,4 +23,4 @@ func (f ListField) Value() (driver.Value, error) {
|
||||
|
||||
func (f *ListField) Scan(data interface{}) error {
|
||||
return json.Unmarshal(data.([]byte), f)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user