Skip to content

Commit

Permalink
Merge branch 'main' into josh/multiple-input-files
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-berry authored Oct 16, 2023
2 parents d483cb8 + ddbe42f commit 006fb0f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@ jobs:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version: 1.19
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
fetch-depth: 0

- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version: "1.20"
check-latest: true
cache: false

- name: golangci-lint
uses: golangci/golangci-lint-action@639cd343e1d3b897ff35927a75193d57cfcba299 # v3.6.0
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
with:
version: v1.51.2
version: v1.54.2
args: --verbose --timeout 10m --fix=false --new-from-rev=HEAD~ --config=.golangci.yml

shellcheck:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/temporalio/cli

go 1.19
go 1.20

require (
github.com/alitto/pond v1.8.3
Expand Down
10 changes: 1 addition & 9 deletions headersprovider/headers_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package headersprovider

import (
"context"

h "github.com/temporalio/cli/headers"
)

type HeadersProvider interface {
Expand All @@ -18,18 +16,12 @@ type grpcHeaderProvider struct {
headers map[string]string
}

func newGrpcHeaderProvider(headers map[string]string) *grpcHeaderProvider {
provider := &grpcHeaderProvider{headers}
provider.headers[h.CallerTypeHeaderName] = h.CallerTypeHeaderCLI
return provider
}

func (a grpcHeaderProvider) GetHeaders(ctx context.Context) (map[string]string, error) {
return a.headers, nil
}

func SetGRPCHeadersProvider(headers map[string]string) {
headersProvider = newGrpcHeaderProvider(headers)
headersProvider = &grpcHeaderProvider{headers}
}

func SetCurrent(hp HeadersProvider) {
Expand Down

0 comments on commit 006fb0f

Please sign in to comment.