Learn how to do something you already know in Node.js, like reading a file or making an HTTP server, but written in Go.
Quickly look up the Go equivalent of a JavaScript pattern such as async/await, promises, or JSON handling.
Run the bundled example files locally to see both languages execute the same task and compare their output.
Use as a desk reference when switching between a Node.js codebase and a new Go project.
No installation needed to read the guide. To run examples, install Go and Node.js, then execute files from the examples directory directly.
This repository is a learning guide for Node.js developers who want to learn Go, the programming language also known as Golang. It works by showing the same task done twice: once in Node.js JavaScript and once in Go, side by side, so you can see how familiar patterns translate between the two languages. The guide covers a wide range of programming basics and practical tasks. On the basics side, it includes variables, data types, conditionals, loops, functions, and classes. On the practical side, it covers file operations, working with JSON, handling errors, running external commands, making HTTP servers, parsing URLs, compressing data, looking up DNS records, and working with cryptographic hashes. It also covers asynchronous patterns, showing how Node.js concepts like promises and async/await map to Go's approach using goroutines and channels. Each section presents the Node.js code and the equivalent Go code with their respective terminal output where relevant. The format is intentionally concise: it is not a full tutorial for either language, and the author notes that it assumes you have already gone through Go's official introductory tour. The purpose is to give a high-level translation guide so you can quickly figure out how to do something you already know how to do in Node.js, and then learn the details on your own from there. All of the code examples are also available as runnable files in the repository's examples directory if you want to execute them directly rather than reading the README. The full README is longer than what was shown.
← miguelmota on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.