Go functions
Comprehensive guide to Go functions covering basic parameters, pointers, variadic arguments, multiple return values, error handling, and anonymous functions.
Comprehensive guide to Go functions covering basic parameters, pointers, variadic arguments, multiple return values, error handling, and anonymous functions.
How to use template.FuncMap in Go to register custom functions (like string uppercasing and trimming) for use inside Go templates.
How to handle file uploads in Go by reading a multipart form file and saving it to the server filesystem.
How to set, read, and expire HTTP cookies in a Go web server using the net/http package.
Working with constants in Go, including typed and untyped constants, the iota enumerator, and scoped constant blocks.
Introduction to Go concurrency using goroutines, including basic goroutine invocation and passing arguments to anonymous goroutine functions.
Learn the difference between arrays and slices in Go, including declaration, slicing, the make function, and append operations.
A hands-on Go example demonstrating how to use http.HandleFunc with template rendering and POST form handling via apply and applyProcess routes.
Using http.StripPrefix in Go to serve static files from a local assets directory through a custom URL prefix.
Hands-on example of using http.StripPrefix with http.FileServer in Go to serve CSS and image assets alongside HTML templates.