# Set custom encryption password for the .json file during build export GOTERMINAL_ENC="SoMeStRongPasSwoR2d" go build -ldflags "-X main.fileEncKeyHex=${GOTERMINAL_ENC}" . # or one-liner: go build -ldflags "-X main.fileEncKeyHex=$(openssl rand -hex 32)" .