Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fewer goroutines to fetch secrets, some cleanup #33

Merged
merged 4 commits into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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