Multiple examples of using Go, demonstrating its syntax and native capabilities.
- Table of Contents
- Getting started
- Hello world
- Hello world (intermediate)
- Object orientated
- Random integer range
Ensure you have Go installed.
Run the files using go run <file_path>
.
hello-world
is a simple "Hello world" example, demonstrating Go's syntax and concurrency via its async/await equivalent, channels.
hello-world-intermediate
is an intermediate "Hello world" example, demonstrating Go's syntax and concurrency via its async/await equivalent, channels.
object-oriented
generates a cat object using OOP equivalent methodology.
random-int-range
A truly random integer range. Any number generated through math/rand is not really random by default, as being deterministic it will always print the same value each time.