Refactor and remove sqlite and replace with MySQL
This commit is contained in:
13
internal/helpers/intptr.go
Normal file
13
internal/helpers/intptr.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package helpers
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
)
|
||||
|
||||
func IntPtrIfValid(val sql.NullInt64) *int {
|
||||
if val.Valid {
|
||||
n := int(val.Int64)
|
||||
return &n
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user