Skip to content

Commit

Permalink
Merge pull request #2 from golang-cz/cleanup
Browse files Browse the repository at this point in the history
Update Readme
  • Loading branch information
Lukas Jenicek authored Nov 28, 2023
2 parents fbbc5cb + 6c94b96 commit af33c7e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Tests
on:
push:
branches:
- master
pull_request:


jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Git clone
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }} # Checkout Pull Request HEAD commit instead of the default Pull Request merge commit.
fetch-depth: 1
- name: Setup golang:1.21
uses: actions/setup-go@v4
with:
go-version: "1.21.0"
- name: Run tests
run: |
go test ./...
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Set up HTTP client, which sets `User-Agent`, `Authorization` and `TraceID` heade
authClient := http.Client{
Transport: transport.Chain(
http.DefaultTransport,
transport.UserAgent("my-app/v1.0.0"),
transport.Authorization(fmt.Sprintf("BEARER %v", jwt)),
transport.SetHeader("User-Agent", userAgent),
transport.SetHeader("Authorization", authHeader),
transport.TraceID,
),
Timeout: 15 * time.Second,
Expand All @@ -25,7 +25,7 @@ Or debug all outgoing requests globally within your application:
if debugMode {
http.DefaultTransport = transport.Chain(
http.DefaultTransport,
transport.DebugRequests,
transport.LogRequests,
)
}
```
Expand Down

0 comments on commit af33c7e

Please sign in to comment.