Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose-errors #461

Merged
merged 5 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.