December 2021
Intermediate to advanced
510 pages
11h 20m
English
Using boilerplate code that Cobra generated for your project makes it a little bit harder to write tests for your application. You gain development speed at the expense of flexibility since you’re constrained by the generator’s choices. To overcome this restriction while still benefiting from the generated code, you developed the application using action functions such as listAction and deleteAction. Because these functions are independent from the generated code, you have the flexibility to test them. By doing this, you won’t be testing the part of the code generated by Cobra, but this is acceptable because we trust it was tested by Cobra’s developers.
The action functions accept the parameters required ...
Read now
Unlock full access