Skip to content

nclv/go-grab-xkcd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-grab-xkcd

From Building a CLI application in Go

  • go.mod - Go Modules file used in Go for package management
  • main.go - Main entrypoint of the application
  • comic.go - Go representation of the data as a struct and operations on it
  • xkcd.go - xkcd client for making HTTP calls to the API, parsing response and saving to disk

Run the program as follows-

$ go run main.go -n 323 -o json

Or build it as an executable binary for your laptop and then run-

$ go build .
$ ./go-grab-xkcd -n 323 -s -o json

About

Introduction à Go

Topics

Resources

Stars

Watchers

Forks

Languages