func getAllTags(client flickr.Client, userInfo views.UserInfo) (interface{}, error) { resp, err := client.Tags(userInfo.Id) if err != nil { return nil, err } ctx := views.TagsCtx{ Title: fmt.Sprintf("ihkh : %s", userInfo.UserName), Tags: []string{}, UserInfo: userInfo, } for _, tag := range resp.Tags.Tag { ctx.Tags = append(ctx.Tags, tag) } return ctx, nil }