Below command will run the tests defined in current package
dlv test
# If Go version is outdated
dlv test --check-go-version=false
# Ignore protobuf conflict
GOLANG_PROTOBUF_REGISTRATION_CONFLICT=warn dlv test --check-go-version=false
# Run specific test
GOLANG_PROTOBUF_REGISTRATION_CONFLICT=warn dlv test -- -test.run TestSomething/Create
# 1. Generate coverage file
GOLANG_PROTOBUF_REGISTRATION_CONFLICT=warn go test -cover -coverprofile=/tmp/coverage.out -run ./...
# 2. Convert to readable/html format
go tool cover -html=/tmp/coverage.out -o /tmp/coverage.html
# 3. Open /tmp/coverage.html in browser
- Conditional breakpoints: https://trstringer.com/go-conditional-breakpoints/