This repository contains basic Go programming examples and demonstrations.
Go (also known as Golang) is an open-source programming language created by Google in 2009. It's designed for simplicity, efficiency, and excellent support for concurrent programming. Go is statically typed, compiled, and known for its fast compilation times and built-in concurrency features.
- Fast compilation and execution
- Simple and clean syntax
- Built-in concurrency with goroutines
- Strong standard library
- Garbage collection
- Cross-platform support
sudo apt install golang-goAfter installation, verify that Go is installed correctly:
go versionUsing Homebrew:
brew install goDownload the installer from golang.org/dl and run it.
For the latest version or other platforms, download from the official site:
- Visit golang.org/dl
- Download the appropriate package for your system
- Follow the installation instructions for your platform
Once Go is installed, you can run any of the example programs in this repository:
cd println
go run println-demo.go- println/ - Demonstrates the
fmt.Println()function (README) - import-multiple-packages/ - Demonstrates importing and using multiple packages (README)
- escape-characters/ - Demonstrates escape characters and raw strings (README)
- math-operations/ - Demonstrates basic math operations and operators (README)
- comparison-operators/ - Demonstrates comparison operators (README)