Skip to content

Commit

Permalink
prefix environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmueller committed Dec 19, 2017
1 parent 92a3b90 commit 1bc32bd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions internal/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
}

Expand Down

0 comments on commit 1bc32bd

Please sign in to comment.