mirror of
https://github.com/pion/webrtc.git
synced 2025-09-27 11:32:19 +08:00
Upgrade golangci-lint, more linters
Introduces new linters, upgrade golangci-lint to version (v1.63.4)
This commit is contained in:
@@ -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())
|
||||
}
|
||||
|
Reference in New Issue
Block a user