Path
Go
Write, test and build Go programs with the standard library - modules, types, errors, command-line tools, tests and an HTTP service, all offline in a real terminal.
By Deboistech 6 labs 1 h 19 minBeginner to intermediate
Showing 1 of 6 labs.
- Subscription Your first Go program Start a Go module, write a program, then run, format and build it with the go command.
- Subscription Types, functions and structs Typed functions with two results, a struct with methods, a pointer receiver and an interface.
- Subscription Handling errors Return errors as values, test them with errors.Is, wrap them and turn them into an exit status.
- Subscription A command-line tool with flag Give a Go program string, int and bool flags, and reject bad input with a usage error.
- Subscription Testing with go test Write unit tests and a table test, let them find a real bug, fix it and measure coverage.
- Subscription A small HTTP service Build a JSON HTTP service with net/http, test it with httptest and run it on your own port.
