Skip to content

Commit

Permalink
Log unexpected values for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
paultyng committed Mar 18, 2020
1 parent cc3ee52 commit 9892950
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/plugin/convert/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package convert

import (
"encoding/json"
"log"
"reflect"
"sort"

Expand Down Expand Up @@ -54,6 +55,9 @@ func ConfigSchemaToProto(b *configschema.Block) *proto.Schema_Block {
func protoStringKind(k configschema.StringKind) proto.StringKind {
switch k {
default:
log.Printf("[TRACE] unexpected configschema.StringKind: %d", k)
return proto.StringKind_PLAIN
case configschema.StringPlain:
return proto.StringKind_PLAIN
case configschema.StringMarkdown:
return proto.StringKind_MARKDOWN
Expand Down Expand Up @@ -133,6 +137,9 @@ func ProtoToConfigSchema(b *proto.Schema_Block) *configschema.Block {
func schemaStringKind(k proto.StringKind) configschema.StringKind {
switch k {
default:
log.Printf("[TRACE] unexpected proto.StringKind: %d", k)
return configschema.StringPlain
case proto.StringKind_PLAIN:
return configschema.StringPlain
case proto.StringKind_MARKDOWN:
return configschema.StringMarkdown
Expand Down

0 comments on commit 9892950

Please sign in to comment.