Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
  • Loading branch information
butonic committed Jun 27, 2024
1 parent 0affac1 commit ef0028b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/grpc/services/gateway/appprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,12 @@ func getGRPCConfig(opaque *typespb.Opaque) (bool, bool) {

func getConn(host string, ins, skipverify bool) (*grpc.ClientConn, error) {
if ins {
return grpc.Dial(host, grpc.WithTransportCredentials(insecure.NewCredentials()))
return grpc.NewClient(host, grpc.WithTransportCredentials(insecure.NewCredentials()))
}

// TODO(labkode): if in the future we want client-side certificate validation,
// we need to load the client cert here
tlsconf := &tls.Config{InsecureSkipVerify: skipverify}
creds := credentials.NewTLS(tlsconf)
return grpc.Dial(host, grpc.WithTransportCredentials(creds))
return grpc.NewClient(host, grpc.WithTransportCredentials(creds))
}
4 changes: 2 additions & 2 deletions pkg/sdk/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ func (session *Session) Initiate(host string, insecure bool) error {

func (session *Session) getConnection(host string, ins bool) (*grpc.ClientConn, error) {
if ins {
return grpc.Dial(host, grpc.WithTransportCredentials(insecure.NewCredentials()))
return grpc.NewClient(host, grpc.WithTransportCredentials(insecure.NewCredentials()))
}

tlsconf := &tls.Config{InsecureSkipVerify: false}
creds := credentials.NewTLS(tlsconf)
return grpc.Dial(host, grpc.WithTransportCredentials(creds))
return grpc.NewClient(host, grpc.WithTransportCredentials(creds))
}

// GetLoginMethods returns a list of all available login methods supported by the Reva instance.
Expand Down

0 comments on commit ef0028b

Please sign in to comment.