HowtoGo
How to Go. A Practical Guide and Reference

Learn Go through annotated examples with plain explanations, code alongside the guides and tutorials, or solve one specific problem with the How to Go pages. They cover the same ground from different angles, so start with whichever one fits the way you learn.

$ go doc
↑↓ move ↵ open 125 pages · 38 packages · 66 terms
Interactive

The algorithm pages run in the browser

Every algorithm page carries a diagram you drive yourself. This one is Dijkstra's, working out the shortest route from A to everywhere else.

Settles the nearest unvisited node and shortens the routes leaving it.
Keeps stepping until every node is settled.
Puts every distance back to infinity.

The gopher stands on the node being settled. The number above each node is the shortest distance found so far, and the table under the graph is the same set of numbers in a row.

Read the Dijkstra page →
A six-node weighted graph. Each step settles the nearest unvisited node and shortens the routes reachable from it.
Shortest distance from A
Press Step to settle the nearest unvisited node.
DigitalOcean Referral Badge