Skip to content

rajshekharbind/-GO-LANGUAGE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ GO-LANGUAGE – Complete Golang Learning Repository

This repository is a structured, beginner-to-advanced Golang learning collection. Each folder focuses on one core Go concept, with clean examples, practical use-cases, and hands-on code.

The goal of this repository is to:

  • Build strong Go fundamentals
  • Learn idiomatic Go practices
  • Prepare for interviews, backend development, and system programming

πŸ“‚ Project Structure

GO-LANGUAGE/
β”‚
β”œβ”€β”€ arr/
β”œβ”€β”€ crud/
β”œβ”€β”€ data-conversion/
β”œβ”€β”€ defer/
β”œβ”€β”€ error/
β”œβ”€β”€ file/
β”œβ”€β”€ for-loop/
β”œβ”€β”€ function/
β”œβ”€β”€ goroutine/
β”œβ”€β”€ if-else/
β”œβ”€β”€ inputstring/
β”œβ”€β”€ json/
β”œβ”€β”€ map/
β”œβ”€β”€ myutil/
β”œβ”€β”€ pointer/
β”œβ”€β”€ slice/
β”œβ”€β”€ struct/
β”œβ”€β”€ switch/
β”œβ”€β”€ sync_waitgroup/
β”œβ”€β”€ time/
β”œβ”€β”€ URL/
β”œβ”€β”€ webRequest/
β”‚
β”œβ”€β”€ example.txt
β”œβ”€β”€ go.mod
└── main.go

🧠 Topics Covered (Detailed Explanation)

πŸ“Œ 1. arr (Arrays)

  • Fixed-size collections in Go
  • Declaration and initialization
  • Iteration techniques
  • Memory behavior

Key Concepts:

  • Index-based access
  • Value semantics
  • Compile-time size

πŸ“Œ 2. slice (Slices)

  • Dynamic arrays built on top of arrays
  • append, len, cap
  • Slice reallocation

Why Important? Slices are the most commonly used collection in Go.


πŸ“Œ 3. map (Maps)

  • Key-value data structures
  • Insert, update, delete
  • Iteration over maps

Key Notes:

  • Reference type
  • Fast lookups
  • Unordered

πŸ“Œ 4. function

  • Function declaration & invocation
  • Multiple return values
  • Named return values
  • Variadic functions

πŸ“Œ 5. pointer

  • Pointer basics
  • & and * operators
  • Pass-by-value vs pass-by-reference

Why Pointers Matter?

  • Performance
  • Shared state

πŸ“Œ 6. struct

  • Custom data types
  • Struct fields
  • Nested structs
  • Struct methods

πŸ“Œ 7. if-else

  • Conditional logic
  • Short variable declarations
  • Best practices

πŸ“Œ 8. switch

  • Switch cases
  • Multiple case values
  • Type switch

πŸ“Œ 9. for-loop

  • Classic for-loop
  • While-style loop
  • Infinite loop
  • Range-based loop

πŸ“Œ 10. inputstring

  • Reading input from user
  • fmt.Scan, Scanln
  • Buffer-based input

πŸ“Œ 11. data-conversion

  • Type casting
  • String ↔ int conversion
  • Float conversions

πŸ“Œ 12. json

  • Encoding structs to JSON
  • Decoding JSON into structs
  • Working with APIs

πŸ“Œ 13. error

  • Error handling in Go
  • Custom errors
  • errors.New and fmt.Errorf

Go Philosophy:

Errors are values


πŸ“Œ 14. file

  • File creation
  • Read & write operations
  • File permissions

πŸ“Œ 15. defer

  • Deferred function calls
  • Stack behavior
  • Resource cleanup

πŸ“Œ 16. goroutine

  • Lightweight concurrency
  • go keyword
  • Non-blocking execution

πŸ“Œ 17. sync_waitgroup

  • Synchronizing goroutines
  • sync.WaitGroup
  • Add, Done, Wait

Used for:

  • Parallel processing
  • Safe goroutine completion

πŸ“Œ 18. time

  • Time delays
  • Timers
  • Measuring execution time

πŸ“Œ 19. URL

  • URL parsing
  • Query parameters
  • URL encoding & decoding

πŸ“Œ 20. webRequest

  • HTTP GET requests
  • Handling responses
  • Reading API data

πŸ“Œ 21. crud

  • Create, Read, Update, Delete
  • REST-style operations
  • JSON-based handling

πŸ“„ Other Files

πŸ“˜ example.txt

  • Sample data file
  • Used for file-handling demos

πŸ“˜ main.go

  • Entry point of the application
  • Used for testing or combined execution

πŸ“˜ go.mod

  • Module definition file
  • Dependency management

πŸ›  Requirements

  • Go 1.20+
  • Basic programming knowledge

▢️ How to Run

go run main.go

Or run individual topic files:

go run goroutine/main.go

🎯 Learning Outcomes

  • Strong Golang fundamentals
  • Concurrency mastery
  • Clean and idiomatic Go code
  • Interview-ready concepts

⭐ Who Should Use This Repo?

  • Beginners learning Go
  • Backend developers
  • Students & interview candidates
  • Anyone revising Go concepts

πŸ™Œ Contribution

Feel free to fork, improve examples, or add advanced topics like:

  • Channels
  • Mutex
  • Context
  • Testing

πŸ“Œ Author

Rajshekhar Happy Coding with Go πŸΉπŸš€

About

A scalable backend application built using Go, focusing on performance and concurrency.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages