aboutsummaryrefslogtreecommitdiff
path: root/server/descriptor/descriptor.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/descriptor/descriptor.go')
-rw-r--r--server/descriptor/descriptor.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/server/descriptor/descriptor.go b/server/descriptor/descriptor.go
index ba90289..016d1cc 100644
--- a/server/descriptor/descriptor.go
+++ b/server/descriptor/descriptor.go
@@ -30,10 +30,12 @@ type Log struct {
BaseUrl string `json:"base_url"` // E.g., example.com/st/v1
}
-func (op *Operator) FindLog(logId []byte) (*Log, error) {
- for _, log := range op.Logs {
- if bytes.Equal(logId, log.Id) {
- return log, nil
+func FindLog(ops []Operator, logId []byte) (*Log, error) {
+ for _, op := range ops {
+ for _, log := range op.Logs {
+ if bytes.Equal(logId, log.Id) {
+ return log, nil
+ }
}
}
return nil, fmt.Errorf("no such log: %s", base64.StdEncoding.EncodeToString(logId))