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

https://github.com/alexgalhardo/learning-go

Repository to save my Go programming language studies notes and references.
https://github.com/alexgalhardo/learning-go

go go-programming go-programming-language golang notes studies

Last synced: 27 days ago
JSON representation

Repository to save my Go programming language studies notes and references.

Awesome Lists containing this project

README

          


Learning Go


## Introduction
- Repository to save my Go programming language studies notes and references.

## Install
- https://go.dev/doc/install

## Tools
- Playground:
- Tour:
- MailHog:
-
-
-
-

## Libs and Frameworks

- HTTP
- Gin:
- Fiber:
- Examples:
- Iris:
- ORM
- GoRM:
- Dotenv
- GoDotEnv:
- Live Reloading
- Air:
- Admin Dashboard
- GoAdmin:
- Tests
- Testify:
- Utility
- GoFunk:
- GoUtil :
- Databases
- Golang-Migrate:

## Online Courses

- YouTube
- Aprenda Go PT-BR:
- Udemy
- Learn How To Code: Google's Go (golang) Programming Language:

## Articles
- Frequently Asked Questions (FAQ):
- Why did you create a new language?

## Books
- [A Linguagem de Programação Go](https://www.amazon.com.br/Linguagem-Programa%C3%A7%C3%A3o-Go-Alan-Donovan-ebook/dp/B07KDDJQXS/ref=tmm_kin_swatch_0?_encoding=UTF8&qid=&sr=#customerReviews)

## Github
-
-
-
-
-

## Cheat Sheet CLI commands

### Module Management

- **Initialize a new module**
```sh
go mod init
```

- **Add dependencies**
```sh
go get
```

- **Update dependencies**
```sh
go get -u
```

- **Update dependencies and show details**
```sh
go get -u -v
```

- **Organize the go.mod file**
```sh
go mod tidy
```

- **Check module consistency**
```sh
go mod verify
```

- **Show module dependencies**
```sh
go list -m all
```

### Compiling and Running

- **Compile code**
```sh
go build
```

- **Compile for a specific file**
```sh
go build -o
```

- **Run code**
```sh
go run .go
```

- **Install executable**
```sh
go install
```

### Tests

- **Run tests**
```sh
go test
```

- **Run tests with details**
```sh
go test -v
```

- **Run tests on all packages**
```sh
go test ./...
```

### Documentation

- **Show documentation for a package**
```sh
go doc
```

- **Show documentation and examples for a package**
```sh
go doc -all
```

### Miscellaneous Tools

- **Format code**
```sh
go fmt .go
```

- **Format all project files**
```sh
go fmt ./...
```

- **Check code style**
```sh
go vet
```

- **Download dependencies**
```sh
go mod download
```

- **Check dependency versions**
```sh
go list -m -u all
```

### Binary Generation

- **Compile for multiple platforms**
```sh
GOOS= GOARCH= go build -o
```

Example for compiling for 64-bit Linux:
```sh
GOOS=linux GOARCH=amd64 go build -o meu_programa_linux
```

### Tool Specific Commands

- **Install a specific tool**
```sh
go install
```

Example for installing `golint`:
```sh
go install golang.org/x/lint/golint@latest
```

### Package Management

- **Check for outdated packages**
```sh
go list -u -m all
```

### Debugging

- **Run the debugger**

Note: `dlv` is part of the Delve package for debugging.
```sh
dlv debug
```