Golang for Node.js Developers

Golang for Node.js Developers
Examples of Golang examples compared to Node.js for learning
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
All sample code is available in examples/
- comments
- printing
- variables
- interpolation
- types
- type check
- if/else
- for
- while
- switch
- arrays
- uint8 arrays
- array iteration
- array sorting
- buffers
- maps
- objects
- functions
- default values
- destructuring
- spread operator
- rest operator
- swapping
- classes
- generators
- datetime
- timeout
- interval
- IIFE
- files
- json
- big numbers
- 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
- Contributing
