File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ type CallCredsConfig struct {
9090 // Type contains a name identifying the call credentials type.
9191 Type string `json:"type,omitempty"`
9292 // Config contains the JSON configuration for this call credentials.
93+ // Optional as per gRFC A97.
9394 Config json.RawMessage `json:"config,omitempty"`
9495}
9596
@@ -99,7 +100,7 @@ func (cc CallCredsConfig) Equal(other CallCredsConfig) bool {
99100}
100101
101102func (cc CallCredsConfig ) String () string {
102- if cc .Config == nil {
103+ if len ( cc .Config ) == 0 {
103104 return cc .Type
104105 }
105106 // We do not expect the Marshal call to fail since we wrote to cc.Config.
Original file line number Diff line number Diff line change @@ -91,7 +91,6 @@ func TestChannelCredsBuilders(t *testing.T) {
9191}
9292
9393func TestJWTCallCredsBuilder (t * testing.T ) {
94-
9594 builder := & jwtCallCredsBuilder {}
9695 config := json .RawMessage (`{"jwt_token_file":"/path/to/token.jwt"}` )
9796
You can’t perform that action at this time.
0 commit comments