Skip to content

Instantly share code, notes, and snippets.

@gkhays
Created November 1, 2022 19:13
Show Gist options
  • Save gkhays/762d4d413d41894a62a8f79449871728 to your computer and use it in GitHub Desktop.
Save gkhays/762d4d413d41894a62a8f79449871728 to your computer and use it in GitHub Desktop.
Golang Build Script
#!/bin/bash
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build \
-a \
-v \
-trimpath='true' \
-buildmode='exe' \
-buildvcs='true' \
-compiler='gc' \
-mod='vendor' \
-o ping-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment