Skip to content

Commit

Permalink
chore(consul): deprecated WithAdditionInfo option
Browse files Browse the repository at this point in the history
Signed-off-by: rogerogers <[email protected]>
  • Loading branch information
rogerogers committed Jan 15, 2024
1 parent ead1ccd commit c2c2bf1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion consul/example/custom-config/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func main() {
},
}
r := consul.NewConsulRegister(consulClient,
consul.WithCheck(check), consul.WithAdditionInfo(additionInfo),
consul.WithCheck(check), consul.WithAdditionInfo(additionInfo), //nolint: staticcheck
)

wg.Add(2)
Expand Down
2 changes: 2 additions & 0 deletions consul/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ func WithCheck(check *api.AgentServiceCheck) Option {
}

// WithAdditionInfo is consul registry option to set AdditionInfo.
//
// Deprecated: Due to its limited usage scenarios, we recommend utilizing the original client if this function is required.
func WithAdditionInfo(info *AdditionInfo) Option {
return func(o *options) { o.AdditionInfo = *info }
}
Expand Down

0 comments on commit c2c2bf1

Please sign in to comment.