Skip to content

Commit

Permalink
Use fewer goroutines to fetch secrets, some cleanup (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
kingishb committed May 10, 2022
1 parent 6b64d60 commit d9a9fc9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 2
jobs:
test:
docker:
- image: circleci/golang:1.13
- image: circleci/golang:1.17
steps:
- checkout
- run: GO111MODULE=on go get honnef.co/go/tools/cmd/staticcheck
Expand All @@ -17,4 +17,4 @@ workflows:
version: 2
doit:
jobs:
- test
- test
20 changes: 9 additions & 11 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,20 @@ import (
"github.com/urfave/cli"
)

var (
func main() {

// show secrets in plaintext
secrets = false
secrets := false
// aws profile
profile = ""
profile := ""
// don't print newline on ssm get
noNewLine = false
noNewLine := false
// don't print timestamps of params
hideTS = false
hideTS := false
// remove leading environment; /prod/version -> version
stripPrefix = false
stripPrefix := false
// print tuple of parameter histories
showHistory = false
)

func main() {
showHistory := false

app := cli.NewApp()
app.Version = "1.4.2"
Expand Down Expand Up @@ -273,7 +271,7 @@ func list(s string, showValue, ts, stripPrefix, showHistory bool, service *ssm.S
}

// set n workers based on how many requests may happen
nworkers := 5
nworkers := 2

if showHistory {
nworkers = 1
Expand Down
2 changes: 2 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ GOOS=darwin GOARCH=amd64 go build -o release/ssm-darwin-amd64
sha256sum release/ssm-darwin-amd64 >release/ssm-darwin-amd64.sha
GOOS=linux GOARCH=amd64 go build -o release/ssm-linux-amd64
sha256sum release/ssm-darwin-amd64 >release/ssm-linux-amd64.sha
GOOS=darwin GOARCH=arm64 go build -o release/ssm-darwin-arm64
sha256sum release/ssm-darwin-amd64 >release/ssm-darwin-arm64.sha

0 comments on commit d9a9fc9

Please sign in to comment.