aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/lasiar/canonicalheader/README.md
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2024-09-10 12:16:33 +0200
committerTaras Madan <tarasmadan@google.com>2024-09-10 14:05:26 +0000
commitc97c816133b42257d0bcf1ee4bd178bb2a7a2b9e (patch)
tree0bcbc2e540bbf8f62f6c17887cdd53b8c2cee637 /vendor/github.com/lasiar/canonicalheader/README.md
parent54e657429ab892ad06c90cd7c1a4eb33ba93a3dc (diff)
vendor: update
Diffstat (limited to 'vendor/github.com/lasiar/canonicalheader/README.md')
-rw-r--r--vendor/github.com/lasiar/canonicalheader/README.md77
1 files changed, 77 insertions, 0 deletions
diff --git a/vendor/github.com/lasiar/canonicalheader/README.md b/vendor/github.com/lasiar/canonicalheader/README.md
new file mode 100644
index 000000000..997145219
--- /dev/null
+++ b/vendor/github.com/lasiar/canonicalheader/README.md
@@ -0,0 +1,77 @@
+# canonicalheader
+
+[![CI](https://github.com/lasiar/canonicalheader/actions/workflows/test.yml/badge.svg)](https://github.com/lasiar/canonicalheader/actions/workflows/test.yml)
+[![tag](https://img.shields.io/github/tag/lasiar/canonicalheader.svg)](https://github.com/lasiar/canonicalheader/releases)
+[![Go Report Card](https://goreportcard.com/badge/github.com/lasiar/canonicalheader)](https://goreportcard.com/report/github.com/lasiar/canonicalheader)
+[![License](https://img.shields.io/github/license/lasiar/canonicalheader)](./LICENCE)
+
+Golang linter for check canonical header.
+
+### Install
+
+```shell
+go install -v github.com/lasiar/canonicalheader/cmd/canonicalheader@latest
+```
+
+Or download the binary file from the [release](https://github.com/lasiar/canonicalheader/releases/latest).
+
+
+### Example
+
+before
+
+```go
+package main
+
+import (
+ "net/http"
+)
+
+const testHeader = "testHeader"
+
+func main() {
+ v := http.Header{}
+ v.Get(testHeader)
+
+ v.Get("Test-HEader")
+ v.Set("Test-HEader", "value")
+ v.Add("Test-HEader", "value")
+ v.Del("Test-HEader")
+ v.Values("Test-HEader")
+
+ v.Set("Test-Header", "value")
+ v.Add("Test-Header", "value")
+ v.Del("Test-Header")
+ v.Values("Test-Header")
+}
+
+```
+
+after
+
+```go
+package main
+
+import (
+ "net/http"
+)
+
+const testHeader = "testHeader"
+
+func main() {
+ v := http.Header{}
+ v.Get(testHeader)
+
+ v.Get("Test-Header")
+ v.Set("Test-Header", "value")
+ v.Add("Test-Header", "value")
+ v.Del("Test-Header")
+ v.Values("Test-Header")
+
+ v.Set("Test-Header", "value")
+ v.Add("Test-Header", "value")
+ v.Del("Test-Header")
+ v.Values("Test-Header")
+}
+
+```