Skip to content

Commit 8a15ff9

Browse files
committed
remove redundant nil check
1 parent 853f4e3 commit 8a15ff9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

checker/patroni_leader_checker.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,13 @@ type PatroniLeaderChecker struct {
2020

2121
// NewPatroniLeaderChecker returns a new instance
2222
func NewPatroniLeaderChecker(conf *vipconfig.Config) (*PatroniLeaderChecker, error) {
23-
2423
tlsConfig, err := getTransport(conf)
2524
if err != nil {
2625
return nil, err
2726
}
2827

29-
transport := &http.Transport{}
30-
if tlsConfig != nil {
31-
transport.TLSClientConfig = tlsConfig
28+
transport := &http.Transport{
29+
TLSClientConfig: tlsConfig,
3230
}
3331

3432
client := &http.Client{

0 commit comments

Comments
 (0)