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

detect-api.go (192B)


      1 package xkcd
      2 
      3 // Detect if a specific API is to be used, or the latest API.
      4 func detectAPI(num int) (api string) {
      5 	if num == 0 {
      6 		return latestAPI()
      7 	} else {
      8 		return specificAPI(num)
      9 	}
     10 }