From 1bc32bd9a6a09eecbdad9b5d9a88ebc3f7f27fe0 Mon Sep 17 00:00:00 2001 From: Matthew Date: Tue, 19 Dec 2017 11:41:27 +0700 Subject: [PATCH] prefix environment variables --- .goreleaser.yml | 8 ++++---- internal/env/env.go | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 23b812ed..13b31365 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -5,10 +5,10 @@ build: -X github.com/matthewmueller/joy/internal/version.Version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} - -X github.com/matthewmueller/joy/internal/env.awsAccessKey={{.Env.AWS_ACCESS_ID}} - -X github.com/matthewmueller/joy/internal/env.awsSecretKey={{.Env.AWS_SECRET_ACCESS_KEY}} - -X github.com/matthewmueller/joy/internal/env.awsRegion={{.Env.AWS_REGION}} - -X github.com/matthewmueller/joy/internal/env.firehoseStream={{.Env.AWS_FIREHOSE_STREAM}} + -X github.com/matthewmueller/joy/internal/env.awsAccessKey={{.Env.JOY_AWS_ACCESS_ID}} + -X github.com/matthewmueller/joy/internal/env.awsSecretKey={{.Env.JOY_AWS_SECRET_ACCESS_KEY}} + -X github.com/matthewmueller/joy/internal/env.awsRegion={{.Env.JOY_AWS_REGION}} + -X github.com/matthewmueller/joy/internal/env.firehoseStream={{.Env.JOY_AWS_FIREHOSE_STREAM}} goos: - darwin - linux diff --git a/internal/env/env.go b/internal/env/env.go index a3b6a1d1..765a2ca9 100644 --- a/internal/env/env.go +++ b/internal/env/env.go @@ -20,10 +20,10 @@ type Env struct { // Get the environment func Get() Env { return Env{ - AWSAccessKey: getEnv("AWS_ACCESS_ID", awsAccessKey), - AWSSecretKey: getEnv("AWS_SECRET_ACCESS_KEY", awsSecretKey), - AWSRegion: getEnv("AWS_REGION", awsRegion), - FirehoseStream: getEnv("AWS_FIREHOSE_STREAM", firehoseStream), + AWSAccessKey: getEnv("JOY_AWS_ACCESS_ID", awsAccessKey), + AWSSecretKey: getEnv("JOY_AWS_SECRET_ACCESS_KEY", awsSecretKey), + AWSRegion: getEnv("JOY_AWS_REGION", awsRegion), + FirehoseStream: getEnv("JOY_AWS_FIREHOSE_STREAM", firehoseStream), } }