From c82440258f54d5a1a8eb661765a06e7aa95a717a Mon Sep 17 00:00:00 2001 From: Aaron Lehmann Date: Tue, 14 Jul 2015 14:06:52 -0700 Subject: [PATCH] Add documentation for FindKeyByID function Signed-off-by: Aaron Lehmann --- signer/api/find_key.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/signer/api/find_key.go b/signer/api/find_key.go index be4ee094e7..5a60f0b05a 100644 --- a/signer/api/find_key.go +++ b/signer/api/find_key.go @@ -7,6 +7,9 @@ import ( pb "github.com/docker/notary/proto" ) +// FindKeyByID looks for the key with the given ID in each of the +// signing services in sigServices. It returns the first matching key it finds, +// or ErrInvalidKeyID if the key is not found in any of the signing services. func FindKeyByID(sigServices signer.SigningServiceIndex, keyID *pb.KeyID) (*pb.PublicKey, signer.SigningService, error) { for _, service := range sigServices { key, err := service.KeyInfo(keyID)