Summary
This chapter introduced database operations and web forms. Now, you will be able to build web applications that can store data in databases. Arrays, slices, two-dimensional slices, and maps were covered with code samples. Array methods such as len, iterating through an array using for, and range were explained in this chapter using code snippets. Two-dimensional arrays and slice of slices were discussed in the Slices section.
Maps were explained with various scenarios such as adding keys and values, as well as retrieving and deleting values. Maps of different types, such as strings and integers, were also discussed in this chapter. Furthermore, variadic functions, deferred function calls, and panic and recover operations were demonstrated in the Database operations and CRUD web forms sections.
The CRM application was built as a web application with data persisted in the MySQL database. Database operations for adding, deleting, updating, and retrieving data were shown in code snippets. In addition, web forms for creating, updating, deleting, and viewing customer data were presented using web forms with templates. MySQL driver and its installation details were provided in the Technical requirements section of this chapter. How to create a web application using Go was demonstrated with execution details.
The next chapter will have topics related to linear data structures such as lists, sets, tuples, and stacks.