Golang Cheatsheet for Node.js Developers

Golang Cheatsheet for Node.js Developers

Golang cheat sheets for Node.js developers. Golang examples compared to Node.js. This guide full of examples is intended for people learning golang-cheat-sheet that are coming from Node.js, although the vice versa can work too. golang-for-node-js-developers

Golang__ examples compared to __Node.js

(original open source: https://github.com/miguelmota/golang-for-nodejs-developers — I added and modified a lot of examples for more context, conciseness and JS idiomaticness)

Will add WebAssembly examples — so keep coming back!

This guide full of examples is intended for people learning Go that are coming from Node.js, although the vice versa can work too. This is not meant to be a complete guide and it is assumed that you’ve gone through the  Tour of Go tutorial. This guide is meant to be barely good enough to help you at a high level understand how to do X in Y and doing further learning on your own is of course required.


  • Examples
  • comments
  • printing
  • logging
  • variables
  • interpolation
  • types
  • type check
  • if/else
  • ternary
  • for
  • while
  • switch
  • arrays
  • uint8 arrays
  • array iteration
  • buffers
  • maps
  • objects
  • functions
  • default values
  • destructuring
  • spread operator
  • rest operator
  • swapping
  • classes
  • generators
  • datetime
  • timeout
  • interval
  • IIFE
  • files
  • json
  • big numbers
  • uint
  • promises
  • async/await
  • streams
  • event emitter
  • errors
  • try/catch
  • exceptions
  • regex
  • exec (sync)
  • exec (async)
  • tcp server
  • udp server
  • http server
  • url parse
  • gzip
  • dns
  • crypto
  • env vars
  • cli args
  • cli flags
  • stdout
  • stderr
  • stdin
  • modules
  • stack trace
  • databases
  • testing
  • benchmarking
  • documentation

nodejs computer-science go

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

What's new in the go 1.15

Go announced Go 1.15 version on 11 Aug 2020. Highlighted updates and features include Substantial improvements to the Go linker, Improved allocation for small objects at high core counts, X.509 CommonName deprecation, GOPROXY supports skipping proxies that return errors, New embedded tzdata package, Several Core Library improvements and more.

Hire NodeJs Developer

Looking to build dynamic, extensively featured, and full-fledged web applications? **[Hire NodeJs Developer](https://hourlydeveloper.io/hire-dedicated-node-js-developer/ "Hire NodeJs Developer")** to create a real-time, faster, and scalable...

Understanding Abstraction in Computer Science

This article is an introduction to abstraction in general. The content presented here applies to several sciences other than software engineering.

How To Build A Data Science Career In 2021

In Conversation With Dr Suman Sanyal, NIIT University,he shares his insights on how universities can contribute to this highly promising sector and what aspirants can do to build a successful data science career.

History of Computing PtI

I would like to preface that the following articles outlining the history of computers by saying this is in no way an exhaustive history of the origin of computers.