{"id":26649057,"url":"https://github.com/ecemkaraman/go-tutorials","last_synced_at":"2026-04-27T21:32:23.472Z","repository":{"id":283280879,"uuid":"951146171","full_name":"ecemkaraman/go-tutorials","owner":"ecemkaraman","description":"Playground for Golang","archived":false,"fork":false,"pushed_at":"2025-06-25T22:19:56.000Z","size":70,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-13T19:09:12.829Z","etag":null,"topics":["concurrency","datastructures","golang","networking","scraper","security"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ecemkaraman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-19T08:27:19.000Z","updated_at":"2025-06-25T22:19:59.000Z","dependencies_parsed_at":"2025-04-20T12:32:02.077Z","dependency_job_id":"c5ffd180-5c48-4a22-ba9a-223f410f6f1f","html_url":"https://github.com/ecemkaraman/go-tutorials","commit_stats":null,"previous_names":["ecemkaraman/go-tutorials"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ecemkaraman/go-tutorials","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecemkaraman%2Fgo-tutorials","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecemkaraman%2Fgo-tutorials/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecemkaraman%2Fgo-tutorials/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecemkaraman%2Fgo-tutorials/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ecemkaraman","download_url":"https://codeload.github.com/ecemkaraman/go-tutorials/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecemkaraman%2Fgo-tutorials/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32356598,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["concurrency","datastructures","golang","networking","scraper","security"],"created_at":"2025-03-25T00:47:52.244Z","updated_at":"2026-04-27T21:32:23.466Z","avatar_url":"https://github.com/ecemkaraman.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-tutorials\nPlayground for Golang\n\n\n## **📂 Go Tutorials Repository Structure**\n\nA **comprehensive Go repository** covering **core language features, concurrency, networking, security, interfaces, error handling, advanced topics, and practical applications.**\n```\ngo-tutorials/\n├── cmd/                                 # 🚀 Central Runner\n│   └── main.go                          # CLI-based entrypoint to explore all modules interactively\n\n├── go.mod                               # 📦 Go module file\n\n├── pkg/                                 # 🧱 Main Go Codebase\n│\n│── advanced/                            # 🔥 Advanced Go Topics\n│   ├── reflection/                      # Using the reflect package\n│   │   └── reflection.go\n│   ├── concurrency/                     # Managing Goroutines with context\n│   │   └── context.go\n│   ├── memory/                          # Memory optimization strategies\n│   │   └── sync_pool.go\n│   ├── modules/                         # Creating and using Go modules\n│   │   └── go_modules.go\n│   ├── testing/                         # Benchmarking with testing.B\n│   │   └── benchmark_test.go\n│   └── run.go                           # Entrypoint for advanced topics\n│\n│── concurrency/                         # ⚡ Concurrency \u0026 Parallelism\n│   ├── goroutines/                      # Goroutine basics and launching\n│   │   └── goroutines.go\n│   ├── channels/                        # Communication through channels\n│   │   ├── buffered.go                  # Buffered channel example\n│   │   ├── unbuffered.go                # Unbuffered channel example\n│   │   └── run.go                       # Unified entrypoint for channels\n│   ├── sync/                            # sync tools for coordination\n│   │   ├── mutex.go                     # sync.Mutex demo\n│   │   ├── rwmutex.go                   # sync.RWMutex demo\n│   │   ├── waitgroup.go                 # sync.WaitGroup demo\n│   │   └── run.go                       # Unified entrypoint for sync\n│\n│── control_flow/                        # 🔄 Control Structures\n│   └── controlflow.go                   # If, switch, and loops demo\n│\n│── data_structures/                    # 🧊 Core Data Structures\n│   ├── arrays/                          # Fixed-size indexed storage\n│   │   └── arrays.go\n│   ├── slices/                          # Dynamic, resizable arrays\n│   │   └── slices.go\n│   ├── maps/                            # Key-value store\n│   │   └── maps.go\n│   ├── structs/                         # Custom types and methods\n│   │   └── structs.go\n│   ├── pointers/                        # Working with memory addresses\n│   │   └── pointers.go\n│   ├── strings/                         # String operations and tricks\n│   │   └── strings.go\n│   └── run.go                           # Entrypoint to run all data structure demos\n│\n│── error_handling/                     # 🚨 Error Handling in Go\n│   ├── standard_errors.go               # Basic errors.New and fmt.Errorf\n│   ├── custom_errors.go                 # Defining custom error types\n│   ├── panic.go                         # Panic \u0026 recover mechanisms\n│   └── run.go                           # Unified error handling entrypoint\n│\n│── file_handling/                      # 📁 Working with Files\n│   ├── read_file.go                     # Reading with os and ioutil\n│   ├── write_file.go                    # Writing to files\n│   ├── append_file.go                   # Appending to files using os.OpenFile\n│   └── run.go                           # Entry point to run all file operations\n│\n│── interfaces/                         # 🎭 Interfaces \u0026 Polymorphism\n│   ├── basic_interface.go               # Defining and using interfaces\n│   ├── interface_as_param.go            # Passing interfaces as function parameters\n│   ├── empty_interface.go               # `interface{}` and type safety\n│   ├── type_assertions.go               # Safe type assertions\n│   ├── type_switch.go                   # Handling multiple types via switch\n│   └── run.go                           # Entrypoint for interface demos\n│\n│── networking_security/               # 🔒 Networking \u0026 Security\n│   ├── http_client/                    # HTTP GET/POST requests\n│   │   └── get_post.go\n│   ├── json/                           # Working with JSON\n│   │   └── json_parsing.go\n│   ├── security/                       # Cryptography tools\n│   │   ├── hashing.go                  # SHA-256, HMAC\n│   │   ├── rsa_keys.go                 # RSA keypair generation\n│   │   └── run.go                      # Unified crypto demo entrypoint\n│   ├── server/                         # Serving content over HTTP\n│   │   └── server.go\n│\n│── practical_apps/                    # 🛠 Practical Applications\n│   ├── cli/                            # Building CLI tools with `flag`\n│   │   └── cli_tool.go\n│   ├── api/                            # Building a REST API with `net/http`\n│   │   └── rest_api.go\n│   ├── scraper/                        # Basic web scraper using `net/html`\n│   │   └── web_scraper.go\n│   ├── caching/                        # In-memory cache with sync.RWMutex\n│   │   └── cache.go\n│   ├── worker/                         # Worker pool pattern with channels\n│   │   └── worker_pool.go\n│   └── run.go                          # Entrypoint to run practical app demos\n```\n\n\n\n\n## **📌 How to Use**\n\n### **🔹 1. Install Go**\n\nEnsure you have **Go installed** on your system.\n\n🔗 [**Download \u0026 Install Go**](https://go.dev/dl/)\n\nVerify installation:\n\n```\ngo version\n\n```\n\n### **🔹 2. Clone the Repository**\n\n```\ngit clone \u003chttps://github.com/ecemkaraman/go-tutorials.git\u003e\ncd go-tutorials\n\n```\n\n### 🔹 3. Run the Central Interactive Runner\n\nThis project uses a **single CLI interface** (`cmd/main.go`) to let you explore all topics interactively:\n\n```bash\ngo run ./cmd\n\n```\n\nYou'll be prompted with a list of topics like:\n\n```\n1 - Arrays\n2 - Maps\n3 - Slices\n...\n18 - Web Scraper\n19 - Worker Pool\n\n```\n\nEnter the number to explore that concept.\n\n### 🔹 4. Optional: Run Specific Files for Quick Demos\n\nWhile `cmd/main.go` is the default interface, you can still run individual files manually for debugging or focused practice. Each folder with multiple files (e.g. channels, file_handling, security, etc.) has a run.go file that serves as a local entrypoint to consolidate related demos.\n\n✅ Example: Run Concurrency → Channels\n\n```bash\ngo run pkg/concurrency/channels/run.go\n\n```\n\n---\n\n## **📌 Key Features**\n\n| Section | Description |\n| --- | --- |\n| 🟢 **Go Core** | Variables, Data Types, Control Flow, Functions |\n| 🔹 **Data Structures** | Arrays, Slices, Maps, Structs, Pointers |\n| ⚡ **Concurrency** | Goroutines, Channels, Mutexes, WaitGroups |\n| 🔒 **Networking \u0026 Security** | HTTP Server, JSON Parsing, Hashing, RSA |\n| 🎭 **Interfaces \u0026 Polymorphism** | Implementing Interfaces, Type Assertions |\n| 🚨 **Error \u0026 File Handling** | Errors, Panic/Recover, File Reading \u0026 Writing |\n| 🔥 **Advanced Go** | Reflection, Context, Memory Optimization, Modules |\n| 🛠 **Practical Apps** | CLI Tools, REST API, Web Scraper, Caching, Worker Pool |\n\n---\n\n## **📌 Dependencies**\n\nThis project uses Go modules. Install dependencies with:\n\n```\ngo mod tidy\n\n```\n\n---\n\n## **📌 Contributing**\n\nWant to improve this project?\n\n1. **Fork the repository**\n2. **Create a new branch** (`feature-new` or `fix-bug`)\n3. **Commit your changes**\n4. **Push \u0026 create a pull request**\n\n---\n\n## **📌 License**\n\nMIT License © [Ecem Karaman](https://github.com/ecemkaraman)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecemkaraman%2Fgo-tutorials","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fecemkaraman%2Fgo-tutorials","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecemkaraman%2Fgo-tutorials/lists"}