func FindPostByObjectID(id string) (Post, error) {
	docID, err := primitive.ObjectIDFromHex(id)
	if err != nil {
		return Post{}, err
	}
	filter := bson.M{"_id": docID}
	var result Post

	err = collectionPost.FindOne(context.Background(), filter).Decode(&result)
	if err != nil {
		return result, err
	}

	return result, nil
}
// FindPostByObjectID find post by _id (objectid)
FindPostByObjectID find post by _id (objectid)
// FindPostByObjectID find post by _id ( objectid )
func FindPostByObjectID(id string) (Post, error) {
	docID, err := primitive.ObjectIDFromHex(id)
	if err != nil {
		return Post{}, err
	}
	filter := bson.M{"_id": docID}
	var result Post
	err = collectionPost.FindOne(context.Background(), filter).Decode(&result)
	if err != nil {
		return result, err
	}
	return result, nil
}
func FindPostByObjectID ( id string ) ( Post , error ) { docID , err := primitive . ObjectIDFromHex ( id ) if err != nil { return Post { } , err } filter := bson . M { " " : docID } var result Post err = collectionPost . FindOne ( context . Background ( ) , filter ) . Decode ( & result ) if err != nil { return result , err } return result , nil }
FindPostByObjectID find post by _id (objectid)
FindPostByObjectID find post by _id ( objectid )