This repository contains code examples for learning the Go programming language (Golang).
- basics - Basic "Hello World" program
- 2_simple_value - Examples of simple data types in Go
- 3_variables - Variable declaration and usage examples
- 4_constant - Constants declaration and usage examples
A simple "Hello World" program to get started with Go.
Demonstrates basic data types in Go:
- Integers
- Strings
- Booleans
- Floats
- Basic arithmetic operations
Shows different ways to declare and use variables in Go:
- Explicit type declaration
- Type inference
- Shorthand syntax
- Variable reassignment
Demonstrates how to work with constants in Go:
- Single constant declaration
- Multiple constants declaration
- Package-level constants
- Function-level constants
To run any example, navigate to its directory and use the go run
command:
cd basics
go run main.go