From 0134e37e3809fd20b6f7984e31cc5209530e7ad6 Mon Sep 17 00:00:00 2001 From: Joshua Carp Date: Sun, 2 Sep 2018 23:02:34 -0400 Subject: [PATCH] Stop paginating after finding a matching parameter. --- store/ssmstore.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/store/ssmstore.go b/store/ssmstore.go index 83dacca0..02759535 100644 --- a/store/ssmstore.go +++ b/store/ssmstore.go @@ -221,9 +221,10 @@ func (s *SSMStore) readLatest(id SecretId) (Secret, error) { for _, param := range o.Parameters { if *param.Name == s.idToName(id) { parameter = param + return false } } - return !lastPage + return true }); err != nil { return Secret{}, err }