diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 49f158e..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,21 +0,0 @@ -version: 2 - -jobs: - build: - working_directory: /go/src/github.com/gudtech/scamp-go/ - docker: - - image: circleci/golang:1.10.3 - steps: - - checkout - - restore_cache: - key: gopkg-{{ .Branch }}-{{ checksum "./scamp/Gopkg.lock" }} - paths: - - /go/src/github.com/gudtech/scamp-go/scamp/vendor - - run: curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh - - run: cd ./scamp && dep ensure -vendor-only - - run: cd ./scamp && go build -v - - save_cache: - key: gopkg-{{ .Branch }}-{{ checksum "./scamp/Gopkg.lock" }} - paths: - - /go/src/github.com/gudtech/scamp-go/scamp/vendor - - run: cd ./scamp && go test -v -race ./... \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e4cc11a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,17 @@ +name: Build and Vet scamp-go + +on: + push: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: '1.26' + - name: Build + run: go build ./... + - name: Vet + run: go vet ./... diff --git a/scamp/requester.go b/scamp/requester.go index fc99764..d04fd42 100644 --- a/scamp/requester.go +++ b/scamp/requester.go @@ -47,8 +47,14 @@ func MakeJSONRequest( var clients []*Client for _, serviceProxy := range serviceProxies { if serviceProxy != nil { - client, err := serviceProxy.GetClient() - if err != nil || client == nil { + client, clientErr := serviceProxy.GetClient() + if clientErr != nil { + Error.Printf("GetClient failed for %s (%s): %s", serviceProxy.Ident(), serviceProxy.ConnSpec(), clientErr) + err = clientErr + continue + } + if client == nil { + Error.Printf("GetClient returned nil client for %s (%s)", serviceProxy.Ident(), serviceProxy.ConnSpec()) continue }