# Code With Go! 🚀

![](https://miro.medium.com/v2/resize:fit:384/0*A6EB_Ykks5bPp_rM.gif)

Inspired from [Go by Example](https://gobyexample.com/) by Mark McGranaghan and Eli Bendersky ([Creative Commons Attribution 3.0 Unported License](https://creativecommons.org/licenses/by/3.0/)), this is an attempt to document the Go learning journey with additional details and features. Of course, thanks to [ChatGPT](https://chat.openai.com/) for most of the explanations 🦾

### Collaborations and Contributions 🤝

This is an open-source effort meant to be freely accessible by the community.

For contributing with code, here's a quick guideline 😉

* Go to <https://github.com/ineelhere/code-with-go>
* You need to either [clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) the repository or [fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) it
* [Create a branch of your own](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository), preferably from the `dev` branch
* [Commit](https://github.com/git-guides/git-commit) your changes
* [Raise a PR](https://docs.github.com/en/desktop/working-with-your-remote-repository-on-github-or-github-enterprise/creating-an-issue-or-pull-request-from-github-desktop) to the `dev` branch
* Now you [chill](https://youtu.be/KOnFBHqztbM) while I review the code🥤

![](https://media.giphy.com/media/0Av9l0VIc01y1isrDw/giphy.gif)

### Table of contents

* [Code With Go! 🚀](https://ineelhere.gitbook.io/code-with-go/readme)
* [Hello World](https://ineelhere.gitbook.io/code-with-go/01-hello-world)
* [Values](https://ineelhere.gitbook.io/code-with-go/2-values)
* [Variables](https://ineelhere.gitbook.io/code-with-go/3-variables)
* [Constants](https://ineelhere.gitbook.io/code-with-go/4-constants)
* [For Loop](https://ineelhere.gitbook.io/code-with-go/5-for)
* [If Else](https://ineelhere.gitbook.io/code-with-go/6-iflese)
* [Switch](https://ineelhere.gitbook.io/code-with-go/7-switch)
* [Array](https://ineelhere.gitbook.io/code-with-go/8-array)
* [Slice](https://ineelhere.gitbook.io/code-with-go/9-slice)
* [Map](https://ineelhere.gitbook.io/code-with-go/10-map)
* [Range](https://ineelhere.gitbook.io/code-with-go/11-range)
* [Functions](https://ineelhere.gitbook.io/code-with-go/12-functions)
* [Multiple Return Values](https://ineelhere.gitbook.io/code-with-go/13-multiple-return-values)
* [Variadic Functions](https://ineelhere.gitbook.io/code-with-go/14-variadic-functions)
* [Closure](https://ineelhere.gitbook.io/code-with-go/15-closure)
* [Recursion](https://ineelhere.gitbook.io/code-with-go/16-recursion)
* [Pointers](https://ineelhere.gitbook.io/code-with-go/17-pointers)
* [Strings and Runes](https://ineelhere.gitbook.io/code-with-go/18-strings-and-runes)
* [Structs](https://ineelhere.gitbook.io/code-with-go/19-structs)
* [Methods](https://ineelhere.gitbook.io/code-with-go/20-methods)
* [Interfaces](https://ineelhere.gitbook.io/code-with-go/21-interfaces)
* [Struct Embedding](https://ineelhere.gitbook.io/code-with-go/22-struct-embedding)
* [Generics](https://ineelhere.gitbook.io/code-with-go/23-generics)
* [Error](https://ineelhere.gitbook.io/code-with-go/24-error)
* [Goroutines](https://ineelhere.gitbook.io/code-with-go/25-goroutines)
* [Channels](https://ineelhere.gitbook.io/code-with-go/26-channels)
* [Channel Buffering](https://ineelhere.gitbook.io/code-with-go/27-channelbuffering)
* [Channel Synchronization](https://ineelhere.gitbook.io/code-with-go/28-channel-synchronization)
* [Channel Directions](https://ineelhere.gitbook.io/code-with-go/29-channel-directions)
* [Select](https://ineelhere.gitbook.io/code-with-go/30-select)
* [Timeouts](https://ineelhere.gitbook.io/code-with-go/31-timeouts)
* [Non-Blocking Channel Operations](https://ineelhere.gitbook.io/code-with-go/32-non-blocking-channel-operations)
* [Closing Channels](https://ineelhere.gitbook.io/code-with-go/33-closing-channels)
* [Range over Channels](https://ineelhere.gitbook.io/code-with-go/34-range-over-channels)
* [Timers](https://ineelhere.gitbook.io/code-with-go/35-timers)
* [Tickers](https://ineelhere.gitbook.io/code-with-go/36-tickers)
* [Worker Pools](https://ineelhere.gitbook.io/code-with-go/37-worker-pools)
* [Wait Groups](https://ineelhere.gitbook.io/code-with-go/38-wait-groups)
* [Rate Limiting](https://ineelhere.gitbook.io/code-with-go/39-rate-limiting)
* [Atomic Counters](https://ineelhere.gitbook.io/code-with-go/40-atomic-conters)
* [Mutexes](https://ineelhere.gitbook.io/code-with-go/41-mutexes)
* [Stateful Goroutines](https://ineelhere.gitbook.io/code-with-go/42-stateful-goroutines)
* [Sorting](https://ineelhere.gitbook.io/code-with-go/43-sorting)
* [Sorting by Functions](https://ineelhere.gitbook.io/code-with-go/44-sorting-by-functions)
* [Panic](https://ineelhere.gitbook.io/code-with-go/45-panic)
* [Defer](https://ineelhere.gitbook.io/code-with-go/46-defer)
* [Recover](https://ineelhere.gitbook.io/code-with-go/47-recover)
* [String Functions](https://ineelhere.gitbook.io/code-with-go/48-string-functions)
* [String Formatting](https://ineelhere.gitbook.io/code-with-go/49-string-formatting)
* [Text Templates](https://ineelhere.gitbook.io/code-with-go/50-text-templates)
* [Regular Expressions](https://ineelhere.gitbook.io/code-with-go/51-regular-expressions)
* [JSON](https://ineelhere.gitbook.io/code-with-go/52-json)
* [XML](https://ineelhere.gitbook.io/code-with-go/53-xml)
* [Time](https://ineelhere.gitbook.io/code-with-go/54-time)
* [Epoch](https://ineelhere.gitbook.io/code-with-go/55-epoch)
* [Time Formatting / Parsing](https://ineelhere.gitbook.io/code-with-go/56-time-formatting-parsing)
* [Random Numbers](https://ineelhere.gitbook.io/code-with-go/57-random-numbers)
* [Number Parsing](https://ineelhere.gitbook.io/code-with-go/58-number-parsing)
* [SHA256 Hashes](https://ineelhere.gitbook.io/code-with-go/59-sha256-hashes)
* [Base64 Encoding](https://ineelhere.gitbook.io/code-with-go/60-base64-encoding)
* [Reading Files](https://ineelhere.gitbook.io/code-with-go/61-reading-files)
* [Writing Files](https://ineelhere.gitbook.io/code-with-go/62-writing-files)
* [Line Filters](https://ineelhere.gitbook.io/code-with-go/63-line-filters)
* [File Paths](https://ineelhere.gitbook.io/code-with-go/64-file-paths)
* [Directories](https://ineelhere.gitbook.io/code-with-go/65-directories)
* [Temporary Files and Directories](https://ineelhere.gitbook.io/code-with-go/66-temporary-files-and-directories)
* [Embed Directive](https://ineelhere.gitbook.io/code-with-go/67-embed-directive)
* [Testing and Benchmarking](https://ineelhere.gitbook.io/code-with-go/68-testing-and-benchmarking)
* [Command-Line Arguments](https://ineelhere.gitbook.io/code-with-go/69-command-line-interface)
* [Command-Line Flags](https://ineelhere.gitbook.io/code-with-go/70-command-line-flags)
* [Command-Line Subcommands](https://ineelhere.gitbook.io/code-with-go/71-command-line-subcommands)
* [Environment Variables](https://ineelhere.gitbook.io/code-with-go/72-environment-variables)
* [Logging](https://ineelhere.gitbook.io/code-with-go/73-logging)
* [HTTP Client](https://ineelhere.gitbook.io/code-with-go/74-http-client)
* [HTTP Server](https://ineelhere.gitbook.io/code-with-go/75-http-server)
* [Context](https://ineelhere.gitbook.io/code-with-go/76-context)
* [Spawning Processes](https://ineelhere.gitbook.io/code-with-go/77-spawning-process)
* [Exec'ing Processes](https://ineelhere.gitbook.io/code-with-go/78-exec-ing-processes)
* [Signals](https://ineelhere.gitbook.io/code-with-go/79-signals)
* [Image resize](https://github.com/ineelhere/letsGo/blob/main/documentation/80-image-resize.md)
* [Exit](https://github.com/ineelhere/letsGo/blob/main/documentation/81-exit.md)

***

**© `Indraneel Chakraborty` | 2024** 🧑‍💻

[Email](mailto:hello.indraneel@gmail.com) | [LinkedIn](https://www.linkedin.com/in/indraneelchakraborty/) | [GitHub](https://github.com/ineelhere)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ineelhere.gitbook.io/code-with-go/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
