Skip to content

Commit deea5bd

Browse files
authored
[chore] apply unkeyed literal initialization prevention (#43791)
1 parent 653fa12 commit deea5bd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

exporter/pulsarexporter/config.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,21 @@ type Authentication struct {
4444
Token configoptional.Optional[Token] `mapstructure:"token"`
4545
Athenz configoptional.Optional[Athenz] `mapstructure:"athenz"`
4646
OAuth2 configoptional.Optional[OAuth2] `mapstructure:"oauth2"`
47+
// prevent unkeyed literal initialization
48+
_ struct{}
4749
}
4850

4951
type TLS struct {
5052
CertFile string `mapstructure:"cert_file"`
5153
KeyFile string `mapstructure:"key_file"`
54+
// prevent unkeyed literal initialization
55+
_ struct{}
5256
}
5357

5458
type Token struct {
5559
Token configopaque.String `mapstructure:"token"`
60+
// prevent unkeyed literal initialization
61+
_ struct{}
5662
}
5763

5864
type Athenz struct {

0 commit comments

Comments
 (0)