PK
Size: a a a
PK
VL
PK
VL
PK
func (u User) Info() (string, int) {
u.username = "Dian"
return u.username, u.id
}PK
PK
VM
VL
RL
J
getPostId:=func (id bson.ObjectId) {
collection := client.Database("my_database").Collection("Information about host")
filter := bson.D{}
var data Data
err := collection.FindOne(context.TODO(), filter).Decode(&data)
if err != nil {
log.Fatal(err)
}
fmt.Println("Found post with title", data.Host)
}
в передаче аргумента id bson.ObjectId пишет undefined: bson.ObjectIdRL
DP
DP
Д