Mastering Go Application Design: HTTP Path Parameters (Part 2)

Part 1 , Part 2 HTTP Api’s often use the url path to identify resource name, id and possibly an action. These parts of the URL path are divided by the / character. Here is an example of using path parameters to implement a key value store where data is saved using the following request GET /set/$key/$value and retrieved using the request GET /get/$key using only the standard library. Go Playground: https://go....

Mastering Go Application Design: HTTP Servers (Part 1)

Part 1 , Part 2 Go is an excellent choice for writing your next http service. It supports multithreaded request handling with the standard library and many other convenient features that makes creating a new application a breeze. Here is an example of a http service that returns the current time as json. Playground: https://go.dev/play/p/gZGKLEhHkPR

Mastering Concurrency in Go: With Fanout and Goroutines (Part 1)

Part 1 , Part 2 , Part 3 , Part 4 , Part 5 Goroutines can be used to take advantage of CPUs with multiple processors. Starting a Goroutine using the “go” keyword, will start execution on a thread in parallel if a thread is available. You will need to make sure that your main function does not exit before all the goroutines finish their work. Playground: https://go.dev/play/p/FTJLzwY34l2