Skip to content

Commit

Permalink
test: add raw string literal
Browse files Browse the repository at this point in the history
  • Loading branch information
lasiar committed Apr 22, 2024
1 parent 87e4749 commit 03f6e8a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
11 changes: 6 additions & 5 deletions testdata/src/p/p.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ func p() {
v := http.Header{}
v.Get(testHeader)

v.Get("Test-HEader") // want `non-canonical header "Test-HEader", instead use: "Test-Header"`
v.Set("Test-HEader", "value") // want `non-canonical header "Test-HEader", instead use: "Test-Header"`
v.Add("Test-HEader", "value") // want `non-canonical header "Test-HEader", instead use: "Test-Header"`
v.Del("Test-HEader") // want `non-canonical header "Test-HEader", instead use: "Test-Header"`
v.Values("Test-HEader") // want `non-canonical header "Test-HEader", instead use: "Test-Header"`
v.Get("Test-HEader") // want `non-canonical header "Test-HEader", instead use: "Test-Header"`
v.Set("Test-HEader", "value") // want `non-canonical header "Test-HEader", instead use: "Test-Header"`
v.Add("Test-HEader", "value") // want `non-canonical header "Test-HEader", instead use: "Test-Header"`
v.Del("Test-HEader") // want `non-canonical header "Test-HEader", instead use: "Test-Header"`
v.Values("Test-HEader") // want `non-canonical header "Test-HEader", instead use: "Test-Header"`
v.Values(`Raw-STRING-Literal`) // want `non-canonical header "Raw-STRING-Literal", instead use: "Raw-String-Literal"`

v.Set("Test-Header", "value")
v.Add("Test-Header", "value")
Expand Down
11 changes: 6 additions & 5 deletions testdata/src/p/p.go.golden
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ func p() {
v := http.Header{}
v.Get(testHeader)

v.Get("Test-Header") // want `non-canonical header "Test-HEader", instead use: "Test-Header"`
v.Set("Test-Header", "value") // want `non-canonical header "Test-HEader", instead use: "Test-Header"`
v.Add("Test-Header", "value") // want `non-canonical header "Test-HEader", instead use: "Test-Header"`
v.Del("Test-Header") // want `non-canonical header "Test-HEader", instead use: "Test-Header"`
v.Values("Test-Header") // want `non-canonical header "Test-HEader", instead use: "Test-Header"`
v.Get("Test-Header") // want `non-canonical header "Test-HEader", instead use: "Test-Header"`
v.Set("Test-Header", "value") // want `non-canonical header "Test-HEader", instead use: "Test-Header"`
v.Add("Test-Header", "value") // want `non-canonical header "Test-HEader", instead use: "Test-Header"`
v.Del("Test-Header") // want `non-canonical header "Test-HEader", instead use: "Test-Header"`
v.Values("Test-Header") // want `non-canonical header "Test-HEader", instead use: "Test-Header"`
v.Values(`Raw-String-Literal`) // want `non-canonical header "Raw-STRING-Literal", instead use: "Raw-String-Literal"`

v.Set("Test-Header", "value")
v.Add("Test-Header", "value")
Expand Down

0 comments on commit 03f6e8a

Please sign in to comment.