December 2021
Intermediate to advanced
510 pages
11h 20m
English
With the to-do REST API server in place, you can now build a command-line application that uses the API to query, add, complete, and delete items.
Start by creating the directory structure for your REST API client under your book’s root directory:
| | $ mkdir -p $HOME/pragprog.com/rggo/apis/todoClient |
| | $ cd $HOME/pragprog.com/rggo/apis/todoClient |
For this application, you’ll use the Cobra framework generator again as you did in Chapter 7, Using the Cobra CLI Framework, to generate some of the boilerplate code for your application.
Initialize a Cobra application in this directory:
| | $ cobra init --pkg-name pragprog.com/rggo/apis/todoClient |
| | Using config file: /home/ricardo/.cobra.yaml ... |
Read now
Unlock full access