specific-api.go (218B)
1 package xkcd 2 3 import "fmt" 4 5 // Return link to specific api, to fetch data about the comic numbered num. 6 func specificAPI(num int) (api string) { 7 api = fmt.Sprintf("https://xkcd.com/%d/info.0.json", num) 8 return api 9 }