Skip to content

Commit

Permalink
Statically assign grpcOptionTLS to GRPCOptionFuncs list
Browse files Browse the repository at this point in the history
Signed-off-by: Chance Zibolski <[email protected]>
  • Loading branch information
chancez authored and rolinh committed Nov 13, 2023
1 parent c87bc0f commit c6fb10f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions cmd/common/conn/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ func init() {
grpcOptionFailOnNonTempDialError,
grpcOptionConnError,
grpcInterceptors,
grpcOptionTLS,
)
}

Expand Down
4 changes: 0 additions & 4 deletions cmd/common/conn/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ import (
"google.golang.org/grpc/credentials"
)

func init() {
GRPCOptionFuncs = append(GRPCOptionFuncs, grpcOptionTLS)
}

func grpcOptionTLS(vp *viper.Viper) (grpc.DialOption, error) {
target := vp.GetString(config.KeyServer)
if !(vp.GetBool(config.KeyTLS) || strings.HasPrefix(target, defaults.TargetTLSPrefix)) {
Expand Down

0 comments on commit c6fb10f

Please sign in to comment.