Skip to content

Commit

Permalink
add type assertion
Browse files Browse the repository at this point in the history
Signed-off-by: WalkerWang731 <wxy1990731@hotmail.com>
  • Loading branch information
WalkerWang731 committed Jan 14, 2021
1 parent b6f9399 commit 2c00b3d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/kafka/auth/plaintext.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ type PlainTextConfig struct {
Mechanism string `mapstructure:"mechanism"`
}

var _ sarama.SCRAMClient = (*scramClient)(nil)

func setPlainTextConfiguration(config *PlainTextConfig, saramaConfig *sarama.Config) error {
saramaConfig.Net.SASL.Enable = true
saramaConfig.Net.SASL.User = config.UserName
Expand All @@ -86,4 +88,4 @@ func setPlainTextConfiguration(config *PlainTextConfig, saramaConfig *sarama.Con

}
return nil
}
}

0 comments on commit 2c00b3d

Please sign in to comment.