Skip to content

Commit

Permalink
Merge pull request #122 from jmcarp/bail-out-pagination
Browse files Browse the repository at this point in the history
Stop paginating after finding a matching parameter.
  • Loading branch information
systemizer authored Sep 7, 2018
2 parents 1f9b223 + 0134e37 commit 29a1f2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion store/ssmstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 29a1f2b

Please sign in to comment.