Skip to content

AritraC1/go-basics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Go

Basics of Go language

Lessons

# Topic Description
01 Hello World Your first Go program - printing "Hello World" to the console
02 Variables Learn Go data types (string, int, float, bool, etc.), variable declaration using var, const, and shorthand :=
03 Packages Import and use built-in packages (fmt, math) and create custom packages (utils module)
04 Functions Define functions with parameters and return types; function calls and basic arithmetic operations
05 Arrays & Slices Fixed-size arrays vs dynamic slices; indexing, slicing, and length operations
06 Conditionals If/else statements and switch cases for control flow
07 Loops For loop variations: condition-based, C-style, and practical examples (FizzBuzz)
08 Maps Key-value pairs; creating, accessing, deleting map entries; checking map length
09 Range Iterating over slices and maps using the range keyword with index and value
10 Pointers Memory addresses, dereferencing with *, and modifying values through pointers
11 Closures Anonymous functions and closures - functions that access outer scope variables
12 Structs Custom data types, struct methods, value/pointer receivers, and modifying struct state
13 Interfaces Define contracts with interfaces; implement multiple types satisfying the same interface
14 Web Basic HTTP server with route handlers using the net/http package

Quick Start

Build and run any lesson:

go run src/01_hello/main.go
go run src/02_variables/main.go
# ... etc

Or build a binary:

go build -o bin/hello src/01_hello/main.go

About

Basics of Go language

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages