Update CI configs to v0.4.12

Update lint scripts and CI configs.
This commit is contained in:
Pion
2020-11-06 19:54:44 +00:00
committed by Sean DuBois
parent c1824714dd
commit ae5c0046da
7 changed files with 30 additions and 3 deletions

View File

@@ -72,6 +72,7 @@ linters:
- wsl # Whitespace Linter - Forces you to use empty lines!
issues:
exclude-use-default: false
exclude-rules:
# Allow complex tests, better to be self contained
- path: _test\.go

View File

@@ -1,3 +1,4 @@
// Package h264reader implements a H264 Annex-B Reader
package h264reader
import (
@@ -83,6 +84,9 @@ func (reader *H264Reader) bitStreamStartsWithH264Prefix() (prefixLength int, e e
return 0, errDataIsNotH264Stream
}
// NextNAL reads from stream and returns then next NAL,
// and an error if there is incomplete frame data.
// Returns all nil values when no more NALs are available.
func (reader *H264Reader) NextNAL() (*NAL, error) {
if !reader.nalPrefixParsed {
_, err := reader.bitStreamStartsWithH264Prefix()

View File

@@ -2,8 +2,10 @@ package h264reader
import "strconv"
// NalUnitType is the type of a NAL
type NalUnitType uint8
// Enums for NalUnitTypes
const (
NalUnitTypeUnspecified NalUnitType = 0 // Unspecified
NalUnitTypeCodedSliceNonIdr NalUnitType = 1 // Coded slice of a non-IDR picture

View File

@@ -15,6 +15,8 @@ func (e *UnknownError) Error() string {
return fmt.Sprintf("UnknownError: %v", e.Err)
}
// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
// an Unwrap method returning error. Otherwise, Unwrap returns nil.
func (e *UnknownError) Unwrap() error {
return e.Err
}
@@ -28,6 +30,8 @@ func (e *InvalidStateError) Error() string {
return fmt.Sprintf("InvalidStateError: %v", e.Err)
}
// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
// an Unwrap method returning error. Otherwise, Unwrap returns nil.
func (e *InvalidStateError) Unwrap() error {
return e.Err
}
@@ -42,6 +46,8 @@ func (e *InvalidAccessError) Error() string {
return fmt.Sprintf("InvalidAccessError: %v", e.Err)
}
// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
// an Unwrap method returning error. Otherwise, Unwrap returns nil.
func (e *InvalidAccessError) Unwrap() error {
return e.Err
}
@@ -55,6 +61,8 @@ func (e *NotSupportedError) Error() string {
return fmt.Sprintf("NotSupportedError: %v", e.Err)
}
// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
// an Unwrap method returning error. Otherwise, Unwrap returns nil.
func (e *NotSupportedError) Unwrap() error {
return e.Err
}
@@ -68,6 +76,8 @@ func (e *InvalidModificationError) Error() string {
return fmt.Sprintf("InvalidModificationError: %v", e.Err)
}
// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
// an Unwrap method returning error. Otherwise, Unwrap returns nil.
func (e *InvalidModificationError) Unwrap() error {
return e.Err
}
@@ -81,6 +91,8 @@ func (e *SyntaxError) Error() string {
return fmt.Sprintf("SyntaxError: %v", e.Err)
}
// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
// an Unwrap method returning error. Otherwise, Unwrap returns nil.
func (e *SyntaxError) Unwrap() error {
return e.Err
}
@@ -94,6 +106,8 @@ func (e *TypeError) Error() string {
return fmt.Sprintf("TypeError: %v", e.Err)
}
// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
// an Unwrap method returning error. Otherwise, Unwrap returns nil.
func (e *TypeError) Unwrap() error {
return e.Err
}
@@ -108,6 +122,8 @@ func (e *OperationError) Error() string {
return fmt.Sprintf("OperationError: %v", e.Err)
}
// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
// an Unwrap method returning error. Otherwise, Unwrap returns nil.
func (e *OperationError) Unwrap() error {
return e.Err
}
@@ -121,6 +137,8 @@ func (e *NotReadableError) Error() string {
return fmt.Sprintf("NotReadableError: %v", e.Err)
}
// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
// an Unwrap method returning error. Otherwise, Unwrap returns nil.
func (e *NotReadableError) Unwrap() error {
return e.Err
}
@@ -135,6 +153,8 @@ func (e *RangeError) Error() string {
return fmt.Sprintf("RangeError: %v", e.Err)
}
// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
// an Unwrap method returning error. Otherwise, Unwrap returns nil.
func (e *RangeError) Unwrap() error {
return e.Err
}

View File

@@ -7,4 +7,4 @@ type RTPTransceiverInit struct {
// Streams []*Track
}
type RtpTransceiverInit = RTPTransceiverInit //nolint: stylecheck
type RtpTransceiverInit = RTPTransceiverInit //nolint: stylecheck,golint

View File

@@ -75,5 +75,5 @@ func TestSessionDescription_Unmarshal(t *testing.T) {
parsed, err = desc.Unmarshal()
assert.NotNil(t, parsed)
assert.NoError(t, err)
pc.Close()
assert.NoError(t, pc.Close())
}

View File

@@ -312,7 +312,7 @@ func (e *SettingEngine) getSDPExtensions() map[SDPSectionType][]sdp.ExtMap {
return e.sdpExtensions
}
// SetProxyDialer sets the proxy dialer interface based on golang.org/x/net/proxy.
// SetICEProxyDialer sets the proxy dialer interface based on golang.org/x/net/proxy.
func (e *SettingEngine) SetICEProxyDialer(d proxy.Dialer) {
e.iceProxyDialer = d
}