func Delete(c *gin.Context) {
	db := c.MustGet("db").(*mgo.Database)
	query := bson.M{"_id": bson.ObjectIdHex(c.Param("_id"))}
	err := db.C(models.CollectionArticle).Remove(query)
	if err != nil {
		c.Error(err)
	}
	c.Redirect(http.StatusMovedPermanently, "/articles")
}
func Delete(c *gin.Context) {
	db := c.MustGet("db").(*mgo.Database)
	query := bson.M{"_id": bson.ObjectIdHex(c.Param("_id"))}
	err := db.C(models.CollectionArticle).Remove(query)
	if err != nil {
		c.Error(err)
	}
	c.Redirect(http.StatusMovedPermanently, "/articles")
}
func Delete ( c * gin . Context ) { db := c . MustGet ( " " ) . ( * mgo . Database ) query := bson . M { " " : bson . ObjectIdHex ( c . Param ( " " ) ) } err := db . C ( models . CollectionArticle ) . Remove ( query ) if err != nil { c . Error ( err ) } c . Redirect ( http . StatusMovedPermanently , " " ) }
// Delete an article
Delete an article