Skip to content

Commit

Permalink
update golangci-lint (#554)
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 authored Apr 28, 2024
1 parent 2e32d1b commit 363b48e
Show file tree
Hide file tree
Showing 16 changed files with 1,087 additions and 1,062 deletions.
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,3 @@ linters-settings:
disable:
- fieldalignment
- reflectvaluecompare
- shadow
9 changes: 5 additions & 4 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ func (c *Client) trySwitchingProtocol() error {
}

for i, cm := range prevMedias {
_, err := c.doSetup(prevBaseURL, cm.media, 0, 0)
_, err = c.doSetup(prevBaseURL, cm.media, 0, 0)
if err != nil {
return err
}
Expand Down Expand Up @@ -1132,7 +1132,8 @@ func (c *Client) doDescribe(u *base.URL) (*description.Session, *base.Response,
len(res.Header["Location"]) == 1 {
c.reset()

ru, err := base.ParseURL(res.Header["Location"][0])
var ru *base.URL
ru, err = base.ParseURL(res.Header["Location"][0])
if err != nil {
return nil, nil, err
}
Expand Down Expand Up @@ -1325,7 +1326,7 @@ func (c *Client) doSetup(
return nil, liberrors.ErrClientUDPPortsNotConsecutive{}
}

err := cm.allocateUDPListeners(
err = cm.allocateUDPListeners(
false,
nil,
net.JoinHostPort("", strconv.FormatInt(int64(rtpPort), 10)),
Expand Down Expand Up @@ -1480,7 +1481,7 @@ func (c *Client) doSetup(
readIP = c.nconn.RemoteAddr().(*net.TCPAddr).IP
}

err := cm.allocateUDPListeners(
err = cm.allocateUDPListeners(
true,
readIP,
net.JoinHostPort(thRes.Destination.String(), strconv.FormatInt(int64(thRes.Ports[0]), 10)),
Expand Down
Loading

0 comments on commit 363b48e

Please sign in to comment.