Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #17 from meltwater/update-aws-sdk
Browse files Browse the repository at this point in the history
Updated AWS SDK to solve #16
  • Loading branch information
jcsorvasi committed Jan 30, 2017
2 parents 8f71387 + f89a3f5 commit e7e9196
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func decryptEnvironment(input []string, output io.Writer, crypto DecryptionStrat
if len(envelopes) > 0 {
if !shellIdentifierRegexp.Match([]byte(key)) {
ok = false
err = fmt.Errorf("The env var '%s' is not a valid shell script identifier. Only alphanumeric characters and underscores are supported, starting with an alphabetic or underscore character.", key)
err = fmt.Errorf("the env var '%s' is not a valid shell script identifier. Only alphanumeric characters and underscores are supported, starting with an alphabetic or underscore character", key)
fmt.Fprintf(os.Stderr, "%s: %s\n", key, err)
}

Expand Down
2 changes: 1 addition & 1 deletion commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func TestDecryptEnvironmentCommand(t *testing.T) {
ok, err := decryptEnvironment(input, &output, crypto)

assert.False(t, ok)
assert.Equal(t, "The env var 'b.c' is not a valid shell script identifier. Only alphanumeric characters and underscores are supported, starting with an alphabetic or underscore character.", err.Error())
assert.Equal(t, "the env var 'b.c' is not a valid shell script identifier. Only alphanumeric characters and underscores are supported, starting with an alphabetic or underscore character", err.Error())
}
}

Expand Down
8 changes: 4 additions & 4 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import:
- nacl/box
- nacl/secretbox
- package: github.com/aws/aws-sdk-go
version: v1.4.14
version: v1.6.18
subpackages:
- aws/session
- service/kms
8 changes: 4 additions & 4 deletions kms.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"fmt"
"io"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/ec2metadata"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/kms"

"golang.org/x/crypto/nacl/secretbox"
Expand All @@ -34,10 +34,10 @@ type KmsClientImpl struct {
Impl *kms.KMS
}

// A function that operates on the KMS service
// KmsFunction is a lambda that operates on the KMS service
type KmsFunction func(*kms.KMS) error

// Executes a function with retry for MissingRegion errors
// CallWithRetry executes a function with retry for MissingRegion errors
func (k *KmsClientImpl) CallWithRetry(f KmsFunction) error {
// Lazy initialize the session
if k.Impl == nil {
Expand Down Expand Up @@ -65,7 +65,7 @@ func (k *KmsClientImpl) CallWithRetry(f KmsFunction) error {

if err == nil {
sess, err := session.NewSessionWithOptions(session.Options{
Config: aws.Config{Region: aws.String(doc.Region)},
Config: aws.Config{Region: aws.String(doc.Region)},
SharedConfigState: session.SharedConfigEnable,
})

Expand Down

0 comments on commit e7e9196

Please sign in to comment.