Upgrade golangci-lint, more linters

Introduces new linters, upgrade golangci-lint to version (v1.63.4)
This commit is contained in:
Joe Turki
2025-01-02 06:04:12 -06:00
parent 99dcc6b7bf
commit feeeebf251
147 changed files with 3842 additions and 2139 deletions

View File

@@ -8,7 +8,7 @@ import (
)
// SDPSemantics determines which style of SDP offers and answers
// can be used
// can be used.
type SDPSemantics int
const (
@@ -24,7 +24,7 @@ const (
// SDPSemanticsUnifiedPlanWithFallback prefers unified-plan
// offers and answers, but will respond to a plan-b offer
// with a plan-b answer
// with a plan-b answer.
SDPSemanticsUnifiedPlanWithFallback
)
@@ -58,7 +58,7 @@ func (s SDPSemantics) String() string {
}
}
// UnmarshalJSON parses the JSON-encoded data and stores the result
// UnmarshalJSON parses the JSON-encoded data and stores the result.
func (s *SDPSemantics) UnmarshalJSON(b []byte) error {
var val string
if err := json.Unmarshal(b, &val); err != nil {
@@ -66,10 +66,11 @@ func (s *SDPSemantics) UnmarshalJSON(b []byte) error {
}
*s = newSDPSemantics(val)
return nil
}
// MarshalJSON returns the JSON encoding
// MarshalJSON returns the JSON encoding.
func (s SDPSemantics) MarshalJSON() ([]byte, error) {
return json.Marshal(s.String())
}