Skip to content

Commit

Permalink
Merge pull request #78 from dell/add-go-workflow
Browse files Browse the repository at this point in the history
Call reusable action for go version updates
  • Loading branch information
shaynafinocchiaro authored Oct 2, 2024
2 parents 1c0f6fc + 740295a commit a4bf45e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/go-version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0

# Reusable workflow to perform go version update on Golang based projects
name: Go Version Update

on:
workflow_dispatch:
repository_dispatch:
types: [go-update-workflow]

jobs:
# go version update
go-version-update:
uses: dell/common-github-actions/.github/workflows/go-version-workflow.yaml@main
name: Go Version Update
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/linters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: |
go mod vendor
- name: golangci-lint
uses: golangci/golangci-lint-action@v5
uses: golangci/golangci-lint-action@v6
with:
version: latest
skip-cache: true
2 changes: 1 addition & 1 deletion test/mock-server/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func FindStub(service, method string, in, out interface{}) error {

if resp.StatusCode != http.StatusOK {
body, _ := ioutil.ReadAll(resp.Body)
return fmt.Errorf(string(body))
return fmt.Errorf("%v", string(body))
}

respRPC := new(response)
Expand Down
4 changes: 2 additions & 2 deletions test/mock-server/stub/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func stubNotFoundError(stub *findStubPayload, closestMatches []closeMatch) error
template += expectString

if len(closestMatches) == 0 {
return fmt.Errorf(template)
return fmt.Errorf("%s", template)
}

highestRank := struct {
Expand All @@ -140,7 +140,7 @@ func stubNotFoundError(stub *findStubPayload, closestMatches []closeMatch) error
closestMatchString := renderFieldAsString(closestMatch.expect)
template += fmt.Sprintf("\n\nClosest Match \n\n%s:%s", closestMatch.rule, closestMatchString)

return fmt.Errorf(template)
return fmt.Errorf("%s", template)
}

// we made our own simple ranking logic
Expand Down

0 comments on commit a4bf45e

Please sign in to comment.