Skip to content

Commit 8143617

Browse files
committed
Use YAML for the config.
Note that this also gives us JSON for free.
1 parent 6d4bc2f commit 8143617

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

go/cmd/doorman/doorman_server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ import (
2626
"golang.org/x/net/context"
2727

2828
log "github.com/golang/glog"
29-
"github.com/golang/protobuf/proto"
3029
"github.com/prometheus/client_golang/prometheus"
3130
rpc "google.golang.org/grpc"
3231
"google.golang.org/grpc/credentials"
3332

33+
"github.com/ghodss/yaml"
3434
"github.com/youtube/doorman/go/configuration"
3535
"github.com/youtube/doorman/go/connection"
3636
"github.com/youtube/doorman/go/flagenv"
@@ -209,7 +209,7 @@ func main() {
209209
continue
210210
}
211211
cfg := new(pb.ResourceRepository)
212-
if err := proto.UnmarshalText(string(data), cfg); err != nil {
212+
if err := yaml.Unmarshal(data, cfg); err != nil {
213213
log.Errorf("cannot unmarshal config data: %q", data)
214214
continue
215215
}

0 commit comments

Comments
 (0)