Skip to content

Commit

Permalink
updates: remove unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
fghanmi committed Aug 4, 2024
1 parent b02bf47 commit b9a598b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkg/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"fmt"
"os"
"path/filepath"
"time"

"github.com/google/trillian"
"github.com/redis/go-redis/v9"
Expand All @@ -49,10 +48,7 @@ import (
_ "github.com/sigstore/rekor/pkg/pubsub/gcp" // Load GCP pubsub implementation
)

func dial(ctx context.Context, rpcServer string) (*grpc.ClientConn, error) {
ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
defer cancel()

func dial(rpcServer string) (*grpc.ClientConn, error) {
// Set up and test connection to rpc server
var creds credentials.TransportCredentials
tlsCACertFile := viper.GetString("trillian_log_server.tls_ca_cert")
Expand Down Expand Up @@ -107,7 +103,7 @@ func NewAPI(treeID uint) (*API, error) {
viper.GetString("trillian_log_server.address"),
viper.GetUint("trillian_log_server.port"))
ctx := context.Background()
tConn, err := dial(ctx, logRPCServer)
tConn, err := dial(logRPCServer)
if err != nil {
return nil, fmt.Errorf("dial: %w", err)
}
Expand Down

0 comments on commit b9a598b

Please sign in to comment.