Skip to content

Commit c48732f

Browse files
committed
address comments from arjan-bal
1 parent 933f8b0 commit c48732f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

internal/xds/bootstrap/bootstrap.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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

101102
func (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.

xds/bootstrap/bootstrap_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ func TestChannelCredsBuilders(t *testing.T) {
9191
}
9292

9393
func TestJWTCallCredsBuilder(t *testing.T) {
94-
9594
builder := &jwtCallCredsBuilder{}
9695
config := json.RawMessage(`{"jwt_token_file":"/path/to/token.jwt"}`)
9796

0 commit comments

Comments
 (0)