Paperdrip
by Paperdrip
~1 min read

Tags

Sometimes, we want to pass attribute values as environment variable, either for security reason (like password) or to ease the deployment across envrionment.

The argument can be passed in runtime as below,

ENV_VAR=VALUE go run main.go

And VALUE can be retrieved using os.Getenv