Creating a RESTful client
Creating a RESTful client is much easier than programming a server mainly because you do not have to work with the database on the client side. The only thing that the client needs to do is send the right amount and kind of data to the server and receive back the server response. The RESTful client is going to be developed in ~/go/src/github.com/mactsouk/rest-cli
—if you do not plan to make it available to the world, you do not need to create a separate GitHub repository for it. However, for you to be able to see the code of the client, I created a GitHub repository, which is https://github.com/mactsouk/rest-cli.
The supported first-level cobra
commands are the following:
list
: This command accesses the/getall
endpoint and returns the list of userstime
: This command is for visiting the/time
endpointupdate
: This command is for updating user records—the user ID cannot changelogged
: This command lists all logged...