Skip to content

Commit

Permalink
Expose-errors (#461)
Browse files Browse the repository at this point in the history
* Bumped to golang 1.22
* Bumped golangci-lint to `v1.56.2`
* Bumped mockery to `v2.42.0`
* Bumped version to 1.0.3
  • Loading branch information
ATGardner authored Feb 21, 2024
1 parent 27dcaec commit 15e356d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=v1.0.2
VERSION=v1.0.3

ifndef GOBIN
ifndef GOPATH
Expand Down Expand Up @@ -48,9 +48,9 @@ cur-version:
@echo -n $(VERSION)

$(GOBIN)/mockery:
@go install github.com/vektra/mockery/v2@v2.39.1
@go install github.com/vektra/mockery/v2@v2.42.0
@mockery --version

$(GOBIN)/golangci-lint:
@echo installing: golangci-lint
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v1.55.2
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v1.56.2
2 changes: 1 addition & 1 deletion codefresh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
prepare_env_vars: &deps
stage: Prepare
title: prepare-env
image: quay.io/codefresh/golang-ci-helper:1.21
image: quay.io/codefresh/golang-ci-helper:1.22
commands:
- cf_export GO111MODULE=on
- cf_export GOCACHE=/codefresh/volume/gocache # change gopath to codefresh shared volume
Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/codefresh-io/go-sdk

go 1.21

toolchain go1.21.5
go 1.22

require (
github.com/stretchr/testify v1.8.4
Expand Down
6 changes: 3 additions & 3 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type (
}

GraphqlErrorResponse struct {
errors []GraphqlError
Errors []GraphqlError
concatenatedErrors string
}

Expand Down Expand Up @@ -186,7 +186,7 @@ func (e GraphqlErrorResponse) Error() string {
}

var sb strings.Builder
for _, err := range e.errors {
for _, err := range e.Errors {
sb.WriteString(fmt.Sprintln(err.Message))
}

Expand Down Expand Up @@ -219,7 +219,7 @@ func GraphqlAPI[T any](ctx context.Context, client *CfClient, query string, vari
}

if wrapper.Errors != nil {
err = &GraphqlErrorResponse{errors: wrapper.Errors}
err = &GraphqlErrorResponse{Errors: wrapper.Errors}
}

return result, err
Expand Down
2 changes: 1 addition & 1 deletion pkg/mocks/http_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 15e356d

Please sign in to comment.