https://github.com/gomagoma676/go-basics
🐳 Go basic lesson
https://github.com/gomagoma676/go-basics
Last synced: 6 months ago
JSON representation
🐳 Go basic lesson
- Host: GitHub
- URL: https://github.com/gomagoma676/go-basics
- Owner: GomaGoma676
- Created: 2023-02-27T03:09:07.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-08T07:44:45.000Z (over 2 years ago)
- Last Synced: 2025-04-05T19:23:11.555Z (6 months ago)
- Language: Go
- Homepage:
- Size: 33.2 KB
- Stars: 22
- Watchers: 1
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```bash
# for mac user
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bash_profile
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.zshrc
#create project folder
mkdir go-basics
cd go-basics
#init module
go mod init go-basics
#automatically install/uninstall external package
go mod tidy
#run main.go
go run main.go
or
go run.
```
```bash
#run with race data checker
go run -race .
#run test
go test -v .
#coverage measurement
go test -v -cover -coverprofile=coverage.out .
go tool cover -html=coverage.out
#launch tracer view
go tool trace trace.out
```
```bash
# VS Code settings.json
"[go]": {
"editor.defaultFormatter": "golang.go",
"editor.formatOnSave": true
},
```