Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/monalbarse/learn-go

This repo is my journey of learning Go. I have developed a checklist to get started with Go, which you can follow along with. In plan to add links to helpful materials to further enhance out learning experience.
https://github.com/monalbarse/learn-go

golang

Last synced: about 1 month ago
JSON representation

This repo is my journey of learning Go. I have developed a checklist to get started with Go, which you can follow along with. In plan to add links to helpful materials to further enhance out learning experience.

Awesome Lists containing this project

README

        

# Learn-Go

This repository contains the **code snippets and examples** of what I will do while learning Go. It serves as a comprehensive guide to get started with Go, covering fundamental concepts, language features, and few advanced topics.

Each section of the repository aligns with specific learning goals. You'll find examples, explanations (in the code's comment itself)
Feel free to explore the different sections, contribute, or use this repository as a reference for your own Go Learning.

---

**Checklist for the roadmap:**

## Basics

- [x] Installation and Setup: Setting up Go environment and understanding GOPATH.
- [x] GOPATH and Reading Go Docs: Configuring GOPATH and using Go documentation effectively.
- [x] Variables, Types, and Constants: Declaring variables, specifying types, and working with constants.
- [x] Conversions and Type Handling: Type conversions and handling different data types in Go.
- [x] Handling Time: Working with time and date in Go programs.
- [x] Memory Management: Basics of memory management in Go and understanding garbage collection.

## Language Fundamentals

- [x] Pointers: Understanding pointers and their usage in Go.
- [x] Arrays: Declaring and using arrays in Go.
- [x] Slices: Creating, modifying, and manipulating slices in Go.
- [x] Maps: Working with key-value pairs using maps in Go.
- [x] Structs: Defining and utilizing structs to create user-defined data types.

## Control Flow

- [x] Comma Ok Syntax: Using comma ok syntax for retrieving values from maps and channels.
- [x] If-Else Statements: Implementing conditional logic using if-else statements.
- [x] Switch-Case Statements: Handling multiple conditional cases using switch-case statements.
- [x] Loops (Break, Continue, Goto): Implementing loops and controlling loop flow with break, continue, and goto statements.

## Functions and Methods

- [x] Functions: Declaring functions, passing arguments, and returning values in Go.
- [x] Methods: Defining methods on structs and other types in Go.
- [x] Defer Statements: Using defer to delay execution of a function until the surrounding function returns.

## File Handling and Web Requests

- [x] Working with Files: Reading and writing files in Go, handling errors.
- [x] Handling Web Requests and URLs: Creating HTTP servers, handling routes, and parsing URLs.
- [x] Creating Servers: Setting up a basic server for serving web applications or APIs.

## Misc Topics

### Makefiles - [Resource](https://www.youtube.com/watch?v=QPfNopc6B_g&list=PLtimIuw_6KzXti4B_Y6xIEj88YlstpCnk)

### Building API in Golang

- [x] Models
- [x] Sending API JSON response
- [x] CRUD Operations (Controllers)
- [x] Handling routes and testing routes

### **MongoDB & API handeling:**

- [x] CRUD operations - Insert, Update, Delete records
- [x] Querying MongoDB
- [x] Handling collections

### **Goroutines in Golang:** [Resource](https://youtu.be/qyM8Pi1KiiM?si=XFjd6lcIcmh_5NUP)

- [x] Concurrency & Parallelism
- [x] Goroutines
- [x] Wait Groups
- [x] Mutex
- [x] Race Condition
- [x] Channels

## Advanced Topics to Cover

### Error Handling

- [ ] Understanding Go's error handling mechanisms.
- [ ] Handling errors using `error` interface and `errors` package.
- [ ] Implementing custom error types and wrapping errors.
- [ ] Best practices for error handling in Go.

### Testing

- [ ] Writing unit tests using the `testing` package.
- [ ] Creating test functions and test tables.
- [ ] Running tests and interpreting test output.
- [ ] Writing benchmark tests for performance evaluation.
- [ ] Using subtests and benchmarks effectively.

### Optimization and Profiling

- [ ] Profiling Go applications with `runtime/pprof` package.
- [ ] Analyzing CPU and memory profiles.
- [ ] Identifying and optimizing performance bottlenecks.
- [ ] Techniques for reducing memory allocations and CPU usage.

### Package Management -- [Resource1](https://youtu.be/O8uUGEobo-Q?si=iV6z0znekAsz3-Xm) [Resource2](https://youtu.be/20sLKEpHvvk?si=jt9iTO4eoD4EZRbd)

- [x] Understanding the role of `go.mod` files in Go modules.
- [x] Managing dependencies and versioning in Go.
- [ ] Working with private repositories and proxy servers.
- [ ] Resolving dependency conflicts and ensuring reproducibility.

### Best Practices and Design Patterns

- [ ] Applying clean coding practices in Go.
- [ ] Implementing design patterns like Singleton, Factory, and Observer in Go.
- [ ] Structuring Go projects for maintainability and scalability. [Resource1](https://youtu.be/dJIUxvfSg6A?si=QjV_dY6jKd3CFewp) [Resource2](https://youtu.be/OVwUldzmVOg?si=KA37L0CjM-JZk8Wg)
- [ ] Writing idiomatic Go code and adhering to Go's community style guide.

### Advanced Concurrency

- [ ] Using goroutines and channels for concurrent programming.
- [ ] Implementing advanced concurrency patterns like Worker Pools.
- [ ] Coordinating multiple goroutines with WaitGroups and Mutexes.
- [ ] Handling concurrency pitfalls like race conditions and deadlocks.

### Performance Optimization

- [ ] Techniques for optimizing memory usage in Go applications.
- [ ] Improving CPU performance through algorithmic optimizations.
- [ ] Leveraging caching and memoization techniques in Go.
- [ ] Benchmarking and profiling to measure performance improvements.