March 2019
Intermediate to advanced
336 pages
9h 9m
English
The main method handles the Home, Alter, Create, Update, View, Insert, and Delete functions with different aliases for lookup and renders the templates appropriately. HttpServer listens to port 8000 and waits for template alias invocation:
// main methodfunc main() { log.Println("Server started on: http://localhost:8000") http.HandleFunc("/", Home) http.HandleFunc("/alter", Alter) http.HandleFunc("/create", Create) http.HandleFunc("/update", Update) http.HandleFunc("/view", View) http.HandleFunc("/insert", Insert) http.HandleFunc("/delete", Delete) http.ListenAndServe(":8000", nil)}
Let's take a look at the Header, Footer, Menu, Create, Update, and View templates in the following sections.
Read now
Unlock full access