├── LICENSE ├── README.md ├── assets └── images │ ├── gopher-detective.png │ ├── gopher-hacker.png │ ├── gopher-packing.png │ └── gopher-robot.png └── installation ├── linux.md ├── osx.md ├── readme.md └── windows.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Arthur Andrade 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # learn-go -------------------------------------------------------------------------------- /assets/images/gopher-detective.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthur404dev/learn-go/7f3928328463a3f947817e78edbe8ec17a6913a5/assets/images/gopher-detective.png -------------------------------------------------------------------------------- /assets/images/gopher-hacker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthur404dev/learn-go/7f3928328463a3f947817e78edbe8ec17a6913a5/assets/images/gopher-hacker.png -------------------------------------------------------------------------------- /assets/images/gopher-packing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthur404dev/learn-go/7f3928328463a3f947817e78edbe8ec17a6913a5/assets/images/gopher-packing.png -------------------------------------------------------------------------------- /assets/images/gopher-robot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthur404dev/learn-go/7f3928328463a3f947817e78edbe8ec17a6913a5/assets/images/gopher-robot.png -------------------------------------------------------------------------------- /installation/linux.md: -------------------------------------------------------------------------------- 1 | # Linux Installation 2 | 3 | This guide covers two methods to install Golang on Linux systems. 4 | 5 | ## Method 1: Official Go Documentation 6 | 7 | 1. **Follow Official Instructions:** 8 | - Visit the [Go installation page for Linux](https://go.dev/doc/install). 9 | - Follow the instructions provided for your specific Linux distribution. 10 | 11 | ## Method 2: Using Linuxbrew 12 | 13 | 1. **Install Linuxbrew:** 14 | 15 | - If not already installed, follow the instructions on the [Linuxbrew website](https://docs.brew.sh/Homebrew-on-Linux). 16 | 17 | 2. **Install Go:** 18 | 19 | - In the terminal, type `brew install go`. 20 | 21 | 3. **Verify Installation:** 22 | - Type `go version` to confirm the installation. 23 | 24 | ## Troubleshooting 25 | 26 | For issues related to the installation, refer to the respective method's documentation or the [Go installation page](https://go.dev/doc/install). 27 | -------------------------------------------------------------------------------- /installation/osx.md: -------------------------------------------------------------------------------- 1 | # macOS Installation 2 | 3 | This guide provides two methods for installing Golang on macOS: direct download and installation via Homebrew. 4 | 5 | ## Method 1: Direct Download 6 | 7 | 1. **Download Go:** 8 | 9 | - Visit the [official Go website](https://go.dev/doc/install) and download the latest version of Go for macOS. 10 | 11 | 2. **Install Go:** 12 | 13 | - Open the downloaded file. 14 | - Follow the prompts in the installation wizard to install Go on your system. 15 | 16 | 3. **Verify Installation:** 17 | 18 | - Open a terminal window. 19 | - Type `go version` and press Enter. 20 | - You should see the installed version of Go displayed. 21 | 22 | 4. **Set Up Your Workspace:** 23 | 24 | - Choose or create a directory where you will keep your Go code (e.g., `~/go`). 25 | - Set this directory as your workspace. 26 | 27 | 5. **Configure Environment Variables:** 28 | - Add the Go workspace's `bin` subdirectory to your `PATH`. 29 | - You can do this by adding `export PATH=$PATH:~/go/bin` to your `.bash_profile` or `.zshrc` file. 30 | 31 | ## Method 2: Installation via Homebrew 32 | 33 | 1. **Install Homebrew:** 34 | 35 | - If you don't have Homebrew installed, follow the [official Homebrew website installation steps](https://docs.brew.sh/) to install it. 36 | 37 | 2. **Install Go:** 38 | 39 | - After installing Homebrew, install Go by running `brew install go` in the terminal. 40 | 41 | 3. **Verify Installation:** 42 | - Type `go version` in the terminal to confirm the installation. 43 | 44 | ## Troubleshooting 45 | 46 | If you encounter issues, verify that your `PATH` is set correctly and that you are using the latest version of Go. For more detailed troubleshooting, refer to the [Go installation documentation](https://go.dev/doc/install). 47 | -------------------------------------------------------------------------------- /installation/readme.md: -------------------------------------------------------------------------------- 1 | # Golang Installation Notes 2 | 3 | Select the guide for your operating system to get detailed instructions on how to install Golang. 4 | 5 | ## Operating Systems 6 | 7 | ### [Windows Installation Guide](/installation/windows.md) 8 | 9 | If you're using Windows, this guide will walk you through installing Golang on your system. It includes steps for setting up your workspace and verifying the installation. This guide also has a special note for users working with Windows Subsystem for Linux (WSL/WSL2). 10 | 11 | ### [macOS Installation Guide](/installation/osx.md) 12 | 13 | For macOS users, this guide provides a straightforward approach to downloading and installing Golang. It also includes steps to verify that the installation was successful. 14 | 15 | ### [Linux Installation Guide](/installation/linux.md) 16 | 17 | This guide offers two options for Linux users. The first option directs you to the official Go documentation for Linux installations. The second option guides you through using Linuxbrew (Homebrew for Linux) to install Golang. 18 | 19 | --- 20 | 21 | Each guide is tailored to the specific needs and common practices of the respective operating system, ensuring you get the most streamlined installation experience. If you encounter any issues or have questions, each guide provides additional resources for troubleshooting and support. 22 | -------------------------------------------------------------------------------- /installation/windows.md: -------------------------------------------------------------------------------- 1 | # Windows Installation 2 | 3 | This guide provides instructions for installing Golang on Windows. 4 | 5 | ## Steps 6 | 7 | 1. **Download Go:** 8 | 9 | - Navigate to the [Go installation website](https://golang.org/dl/). 10 | - Download the latest 64-bit version of Go for Windows. 11 | 12 | 2. **Install Go:** 13 | 14 | - Run the downloaded MSI file. 15 | - Follow the installation prompts. 16 | - By default, Go is installed in `Program Files` or `Program Files (x86)`. 17 | 18 | 3. **Verify Installation:** 19 | 20 | - Open Command Prompt. 21 | - Type `go version` and press Enter. 22 | - Ensure the output shows the installed Go version. 23 | 24 | 4. **Set Up Workspace:** 25 | 26 | - Create a new folder for your Go projects (e.g., `C:\GoProjects`). 27 | - Inside this folder, create three subfolders: `bin`, `pkg`, `src`. 28 | 29 | 5. **Configure GOPATH:** 30 | 31 | - Go to Control Panel > System > Advanced system settings > Environmental Variables. 32 | - Under System Variables, click New and add `GOPATH` pointing to your Go workspace. 33 | 34 | 6. **Update System Path:** 35 | - Ensure `C:\Go\bin` is included in your system's Path variable. 36 | 37 | ## Troubleshooting 38 | 39 | For installation issues, verify the environment variable settings and restart your system. For more help, visit the [Go installation documentation](https://go.dev/doc/install). 40 | --------------------------------------------------------------------------------