//AddTags associate article with tags
AddTags associate article with tags
// AddTags associate article with tags
func (article *Article) AddTags(tags []string) {
	pipe := cache.RedisClient.TxPipeline()
	defer func() {
		_, err := pipe.Exec()
		if err != nil {
			util.Log().Error("redis pipeline 执行失败", err)
		}
	}()
	for _, tag := range tags {
		tid := tagserv.Create(tag)
		cache.LinkSets(
			pipe,
			cache.ArticleTagsKey(article.ID), tid,
			cache.TagArticlesKey(tid), article.ID,
		)
	}
}
func ( article * Article ) AddTags ( tags [ ] string ) { pipe := cache . RedisClient . TxPipeline ( ) defer func ( ) { _ , err := pipe . Exec ( ) if err != nil { util . Log ( ) . Error ( " } } ( ) for _ , tag := range tags { tid := tagserv . Create ( tag ) cache . LinkSets ( pipe , cache . ArticleTagsKey ( article . ID ) , tid , cache . TagArticlesKey ( tid ) , article . ID , ) } }
AddTags associate article with tags
AddTags associate article with tags