feat: error handle?
This commit is contained in:
parent
4c94cb4cfd
commit
0779a4d321
1 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@ package commands
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"log"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"git.wh64.net/muffin/goMuffin/databases"
|
"git.wh64.net/muffin/goMuffin/databases"
|
||||||
|
@ -65,7 +65,7 @@ func getLength(data dataType, userId string) {
|
||||||
cur, err = databases.Learns.Find(context.TODO(), bson.D{{Key: "user_id", Value: userId}})
|
cur, err = databases.Learns.Find(context.TODO(), bson.D{{Key: "user_id", Value: userId}})
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalln(err)
|
fmt.Println(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
defer cur.Close(context.TODO())
|
defer cur.Close(context.TODO())
|
||||||
|
|
Loading…
Reference in a new issue