Last active
July 23, 2025 18:46
-
-
Save mvndaai/2f78868904e8c83381203abc5b2b8f40 to your computer and use it in GitHub Desktop.
Bash commends
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## This is just commands I find useful that I would like to keep | |
# Build and start go project | |
go build . && PORT=80 ./${PWD##*/} | |
# Open Go coverage in a website | |
go test -coverprofile=coverage.out ./... && go tool cover -func=coverage.out && go tool cover -html=coverage.out | |
## Put in ~/.zshrc | |
# Add go bins to path to run things addded by go install | |
export PATH=${PATH}:`go env GOPATH`/bin | |
# Allow go get to find private repos | |
export GOPRIVATE=github.com/<user/group>/* | |
### Aliases | |
alias gcover="go test -coverprofile=coverage.out ./... && go tool cover -func=coverage.out && go tool cover -html=coverage.out" | |
alias main_branch="git branch --remotes --list '*/HEAD' | cut -f3 -d/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment