Skip to content

Commit

Permalink
Comments addition
Browse files Browse the repository at this point in the history
Signed-off-by: Harshit Gupta <harshitgupta@harshits-mbp.in.ibm.com>
  • Loading branch information
Harshit Gupta committed Dec 13, 2022
1 parent 337daba commit 5e33e38
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
32 changes: 23 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
language: go
dist: xenial

dist: bionic

go:
- 1.17.x
- 1.18.x
- 1.19.x
- 1.17.x
- 1.18.x
- 1.19.x

env:
- GO111MODULE=on
- GO111MODULE=on

before_script:
- GO111MODULE=off go get -u github.com/haya14busa/goverage
Expand All @@ -20,7 +21,20 @@ script:
- go tool cover -func=cover.out
- go tool cover -html=cover.out -o=cover.html

# FIXME: these scripts don't exist in this repo
# after_success:
# - ./scripts/calculateCoverage.sh
# - ./scripts/publishCoverage.sh
# To enable semantic-release, uncomment these sections.
before_deploy:
- nvm install 14
- npm install -g npm@6.x
- npm install @semantic-release/changelog
- npm install @semantic-release/exec
- npm install @semantic-release/git
- npm install @semantic-release/github
- pip install --user bump2version
#
deploy:
- provider: script
script: npx semantic-release
skip_cleanup: true
on:
go: '1.18.x'
branch: master
4 changes: 2 additions & 2 deletions kp.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ type ClientConfig struct {
KeyRing string // The ID of the target Key Ring the key is associated with. It is optional but recommended for better performance.
Verbose int // See verbose values above
Timeout float64 // KP request timeout in seconds.
Headers http.Header //Support for Custom Header
Headers http.Header // Support for Custom Header
}

// DefaultTransport ...
Expand Down Expand Up @@ -256,7 +256,7 @@ func (c *Client) do(ctx context.Context, req *http.Request, res interface{}) (*h
if c.Config.KeyRing != "" {
req.Header.Set("x-kms-key-ring", c.Config.KeyRing)
}

// Adding check for Custom Header Input
if c.Config.Headers != nil {
for key, value := range c.Config.Headers {
req.Header.Set(key, strings.Join(value, ","))
Expand Down

0 comments on commit 5e33e38

Please sign in to comment.