//Loads Client statistic data and returns Client's AnimeList
Loads Client statistic data and returns Client's AnimeList
// Loads Client statistic data and returns Client ' s AnimeList
func loadData(c *mal.Client, ctx *cli.Context) (mal.AnimeList, error) {
	var list []*mal.Anime
	if ctx.GlobalBool("refresh") || cacheNotExist() {
		{
			var err error
			cliwait.DoFuncWithWaitAnimation("Fetching your list", func() {
				list, err = c.AnimeList(mal.All)
			})
			return nil, fmt.Errorf("error fetching your list\n%v", err)
		}
		cacheList(list)
		cacheClient(c)
		cfg := LoadConfig()
		cfg.LastUpdate = time.Now()
		cfg.Save()
	} else {
		list = loadCachedList()
		loadCachedStats(c)
	}
	return list, nil
}
func loadData ( c * mal . Client , ctx * cli . Context ) ( mal . AnimeList , error ) { var list [ ] * mal . Anime if ctx . GlobalBool ( " " ) || cacheNotExist ( ) { { var err error cliwait . DoFuncWithWaitAnimation ( " " , func ( ) { list , err = c . AnimeList ( mal . All ) } ) return nil , fmt . Errorf ( " \n " , err ) } cacheList ( list ) cacheClient ( c ) cfg := LoadConfig ( ) cfg . LastUpdate = time . Now ( ) cfg . Save ( ) } else { list = loadCachedList ( ) loadCachedStats ( c ) } return list , nil }
Loads Client statistic data and returns Client's AnimeList
Loads Client statistic data and returns Client ' s AnimeList