canonicalheader

package module
v1.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 16 Imported by: 10 modules, 7 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

canonicalheader

CI tag Go Report Card License

Golang linter for check canonical header.

Install
go install -v github.com/lasiar/canonicalheader/cmd/canonicalheader@latest 

Or download the binary file from the release.

Example

before

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

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")
}

Documentation

Overview

Code generated by initialismer; DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = New()

Functions

func New added in v1.1.3

func New() *analysis.Analyzer

Types

This section is empty.

Directories

Path Synopsis
cmd
canonicalheader command
initialismer command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址