Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Commit f9ea543

Browse files
committed
wrap one more error and remove unused functions
1 parent 9479ae0 commit f9ea543

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

internal/spacelift/client/client.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package client
22

33
import (
44
"context"
5-
"net/http"
65

76
"github.com/pkg/errors"
87
"github.com/shurcooL/graphql"
@@ -64,7 +63,7 @@ func New(endpoint, keyID, keySecret string) (*client, error) {
6463

6564
session, err := session.FromAPIKey(ctx, httpClient)(endpoint, keyID, keySecret)
6665
if err != nil {
67-
return nil, err
66+
return nil, errors.Wrap(err, "failed to create spacelift session")
6867
}
6968

7069
spaceliftClient := spacectl.New(httpClient, session)
@@ -79,11 +78,3 @@ func (c *client) Mutate(ctx context.Context, mutation interface{}, variables map
7978
func (c *client) Query(ctx context.Context, query interface{}, variables map[string]interface{}, opts ...graphql.RequestOption) error {
8079
return c.wraps.Query(ctx, query, variables, opts...)
8180
}
82-
83-
func (c *client) URL(format string, a ...interface{}) string {
84-
return c.wraps.URL(format, a...)
85-
}
86-
87-
func (c *client) Do(req *http.Request) (*http.Response, error) {
88-
return c.wraps.Do(req)
89-
}

0 commit comments

Comments
 (0)