Skip to content

Commit

Permalink
try fixup example
Browse files Browse the repository at this point in the history
  • Loading branch information
instabledesign committed Oct 22, 2020
1 parent 717af24 commit 167d1de
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions middleware/correlation_id_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ func ExampleCorrelationId() {
}()

resp, err := http.Get("http://localhost" + port)
fmt.Printf("%s: %v %v\n", "my-personal-header-name", resp.Header.Get("my-personal-header-name"), err)
if resp != nil {
fmt.Println(err)
} else {
fmt.Printf("%s: %v\n", "my-personal-header-name", resp.Header.Get("my-personal-header-name"))
}

//Output: my-personal-header-name: my-fixed-request-id <nil>
//Output: my-personal-header-name: my-fixed-request-id
}

0 comments on commit 167d1de

Please sign in to comment.