Skip to content

About

Go is an open-source programming language that's used for a variety of purposes, including web development, cloud infrastructure, and server management

Topics

Resources

Code of conduct

Stars

1 star

Watchers

1 watching

Forks

Latest commit

Β 

History

43 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Golang Basics Learning Repository

A comprehensive, beginner-friendly Go programming language learning resource covering fundamental concepts through advanced concurrency patterns.

License: MIT Go Version Language

πŸ“š About This Repository

This repository is a structured learning guide for Go (Golang), an open-source programming language created by Google. Go is used for a variety of purposes, including:

  • 🌐 Web Development - Building REST APIs and web services
  • ☁️ Cloud Infrastructure - Kubernetes, Docker, and cloud-native applications
  • πŸ–₯️ Server Management - High-performance backend services
  • ⚑ Systems Programming - Concurrent and parallel computing

Whether you're a complete beginner or have programming experience in other languages, this repository provides practical examples and explanations for every Go concept.


πŸ“– Curriculum Overview

The repository is organized into 24 progressive modules, each focusing on a specific Go concept:

Foundations

Module Topic Description
01 Hello World Getting started with your first Go program
02 Simple Values Working with integers, floats, strings, and booleans
03 Variables Variable declaration, initialization, and scope
04 Constants Working with immutable constant values

Control Flow

Module Topic Description
05 For Loop Understanding Go's iteration construct
06 If/Else Conditional statements and branching
07 Switch Switch statements for multi-way branching

Data Structures

Module Topic Description
08 Arrays Fixed-size collections of elements
09 Slices Dynamic, flexible arrays in Go
10 Maps Key-value pairs and hash tables
11 Range Iterating over collections efficiently

Functions & Advanced Concepts

Module Topic Description
12 Functions Defining and calling functions, multiple returns
13 Variadic Functions Functions with variable number of arguments
14 Closures Functions that capture variables from outer scope
15 Pointers Working with memory addresses and references

Object-Oriented Programming

Module Topic Description
16 Structs Grouping related data into composite types
17 Interfaces Defining contracts and polymorphism
18 Enums Implementing enumeration patterns

Advanced Features

Module Topic Description
19 Generics Type-safe, reusable code with generics (Go 1.18+)
20 Goroutines Lightweight concurrency primitives
21 Channels Communication between goroutines
22 Mutex Synchronization and mutual exclusion
23 File Operations Reading and writing files
24 Packages Organizing code into reusable modules

πŸš€ Getting Started

Prerequisites

  • Go 1.x installed on your system (Download Go)
  • Basic understanding of programming concepts (helpful but not required)
  • A text editor or IDE (VS Code, GoLand, etc.)

Installation

  1. Clone the repository:

    git clone https://github.com/isinghabhishek/golang_basic.git
    cd golang_basic
  2. Verify Go installation:

    go version
  3. Navigate to any module and run examples:

    cd 1_hello_world
    go run main.go

πŸ’‘ How to Use This Repository

For Beginners

  1. Start with module 01 - Hello World and progress sequentially
  2. Read the comments in each code file carefully
  3. Modify the examples and experiment with different inputs
  4. Try to solve the challenges before looking at solutions

For Experienced Programmers

  • Jump directly to topics you want to learn
  • Compare Go's approach with languages you know
  • Focus on modules like Goroutines, Channels, and Generics
  • Use this as a quick reference guide

Best Practices

  • βœ… Read and understand each example thoroughly
  • βœ… Run every example and observe the output
  • βœ… Modify code to see how it behaves
  • βœ… Practice writing your own variations
  • βœ… Move to the next module only after understanding the current one

πŸ“ Repository Structure

golang_basic/
β”œβ”€β”€ 1_hello_world/          # Your first Go program
β”œβ”€β”€ 2_simple_values/        # Basic data types
β”œβ”€β”€ 3_variables/            # Variable declarations
β”œβ”€β”€ ...
β”œβ”€β”€ 24_packages/            # Organizing code into packages
β”œβ”€β”€ go.mod                  # Go module definition
β”œβ”€β”€ LICENSE                 # MIT License
β”œβ”€β”€ CODE_OF_CONDUCT.md      # Community guidelines
└── README.md              # This file

Each module directory contains:

  • main.go - Example code demonstrating the concept
  • Comments explaining key points and concepts
  • Practical, runnable examples

🎯 Key Learning Outcomes

By completing this repository, you will:

βœ“ Understand Go's syntax and core language features βœ“ Master data structures (arrays, slices, maps) βœ“ Write functions and understand scope βœ“ Implement object-oriented patterns with structs and interfaces βœ“ Build concurrent applications with goroutines and channels βœ“ Work with files and packages βœ“ Apply modern Go features like generics βœ“ Be ready to build real-world applications


🀝 Contributing

Contributions are welcome! If you find bugs, have suggestions, or want to add improvements:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/improvement)
  3. Commit your changes (git commit -m 'Add improvement')
  4. Push to the branch (git push origin feature/improvement)
  5. Open a Pull Request

Please follow the Code of Conduct and ensure your code is well-commented and follows Go conventions.


πŸ“š Additional Resources


πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘€ Author

Abhishek Singh (@isinghabhishek)


πŸ“ž Support & Questions

If you have questions or need help:

  • Open an Issue
  • Check existing discussions
  • Review the code comments and examples

⭐ Show Your Support

If you find this repository helpful, please give it a ⭐ Star! It helps others discover this learning resource.

Happy Coding! πŸŽ‰

About

Go is an open-source programming language that's used for a variety of purposes, including web development, cloud infrastructure, and server management

Topics

Resources

Code of conduct

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages