net/http.CanonicalHeaderKey
in method call on net/http.Header
SCC-S1035The methods on net/http.Header
, namely Add
, Del
, Get
and Set
, already
canonicalize the given header name. Hence, there is no need to call the
http.CanonicalHeaderKey
function for these headers.
headers.Add(http.CanonicalHeaderKey("test"), "test")
headers.Add("test", "test")