When I try to fetch Articles without photo from mysql database:
func ArticlesAllText() ([]Article, error) {
var err error
var result []Article
err = database.SQL.Select(&result, "SELECT * FROM Article WHERE photo IS NULL")
if err != nil {
log.Println(err)
}
return result, standardizeError(err)
}
I get
sql: Scan error on column index 10: unsupported Scan, storing driver.Value type into type *string
When the field value is NULL
.
How can I fix this?