Add pointer reference to database query results
This commit is contained in:
parent
d4a0d05dcc
commit
d140282f08
2
main.go
2
main.go
|
@ -82,7 +82,7 @@ func save(raw []byte) []string {
|
|||
query, err := db.Query("select id, hash, data, delkey from pastebin")
|
||||
for query.Next() {
|
||||
var id, hash, paste, delkey string
|
||||
err := query.Scan(&id, hash, paste, delkey)
|
||||
err := query.Scan(&id, &hash, &paste, &delkey)
|
||||
check(err)
|
||||
if hash == sha {
|
||||
return []string{id, hash, paste, delkey}
|
||||
|
|
Loading…
Reference in New Issue