xkcd-go

Golang tool to read latest, random, or a specific xkcd comic (and download it too).
git clone http://git.hanabi.in/repos/xkcd-go.git
Log | Files | Refs | README | LICENSE

get-num-of-latest-comic.go (172B)


      1 package xkcd
      2 
      3 // Get the number of the latest xkcd.
      4 func getNumOfLatestComic() (latest int) {
      5 	api := latestAPI()
      6 	data := xkcdAPI(api)
      7 	latest = data.Num
      8 	return latest
      9 }