| Index: client/cmd/logdog_butler/output.go
|
| diff --git a/client/cmd/logdog_butler/output.go b/client/cmd/logdog_butler/output.go
|
| index 9d896a58619007db70999bd50a759803597c3416..7c5911788d7d61b689e4a103115ead7832ba3f5f 100644
|
| --- a/client/cmd/logdog_butler/output.go
|
| +++ b/client/cmd/logdog_butler/output.go
|
| @@ -5,6 +5,8 @@
|
| package main
|
|
|
| import (
|
| + "sort"
|
| +
|
| "github.com/luci/luci-go/client/internal/logdog/butler/output"
|
| "github.com/luci/luci-go/common/flag/multiflag"
|
| )
|
| @@ -12,6 +14,7 @@ import (
|
| type outputFactory interface {
|
| option() multiflag.Option
|
| configOutput(a *application) (output.Output, error)
|
| + scopes() []string
|
| }
|
|
|
| // outputConfigFlag instance that produces a MessageOutput instance when run.
|
| @@ -70,3 +73,19 @@ func registerOutputFactory(f outputFactory) {
|
| func getOutputFactories() []outputFactory {
|
| return outputFactories
|
| }
|
| +
|
| +func allOutputScopes() []string {
|
| + scopes := make(map[string]struct{})
|
| + for _, of := range outputFactories {
|
| + for _, scope := range of.scopes() {
|
| + scopes[scope] = struct{}{}
|
| + }
|
| + }
|
| +
|
| + allScopes := make([]string, 0, len(scopes))
|
| + for scope := range scopes {
|
| + allScopes = append(allScopes, scope)
|
| + }
|
| + sort.Strings(allScopes)
|
| + return allScopes
|
| +}
|
|
|