This repository was created while studying the Go programming language. It aims to provide a set of examples on how to use different concepts of the Go programming language.
Examples on how to use Go's features, such as:
- Packages;
- Variables;
- Data types;
- Functions;
- Operators;
- Structs;
- Pointers;
- Arrays & slices;
- Maps;
- If/Else flow control;
- Switch;
- Loops;
- Methods;
- Interfaces;
- Concurrency and concurrency patterns;
- Testing;
- JSON;
- HTTP;
- HTML/CSS/JS;
- Databases;
- Basic CRUD;
- Common algorithms implementation (quicksort, bubble sort, etc.);
During the development of this project, the following technologies were used:
First, you must install Go on your computer.
Here's a set of useful commands when using Go:
$ go help # Show the different available commands
$ go run [fileName.go] # Running Go files
$ go mod init [moduleName] # Creating new modules (similar to JavaScript "package.json" files)
$ go build # Creating executable files
$ go install # Creating executable files and saving in the directory where Go is installed
$ go get [packageUrl] # Installs external packages, for example: "go get github.com/badoux/checkmail"
$ go mod tidy # Remove unused packages from the "go.mod" file
$ go test # Run the test codes ("filename_test.go") from the directory where the command was executed
This repository is under the MIT license. For more information, access LICENSE.