/go-sandbox

:blue_book: Go Lang Sandbox

Primary LanguageGo

Go-Sandbox

Check if is installed and version

go version

Create a module

go mod init {location}/{moduleName}

ex:
go mod init github.com/mymodule

Run projet

go run .

Build module

go build

Install packages

go mod tidy

Make module look to local module

go mod edit -replace {location}/{moduleName}={fisicalLocation}

ex:
go mod edit -replace example.com/greetings=../greetings

Tests

  1. Create test file that end with _test.go
  2. Create test functions that start with Test
  3. Run test
go test

or 

go test -v