Skip to content

Commit

Permalink
common,udpmux: go lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ignoramous committed Aug 20, 2024
1 parent aaef320 commit b9f26ee
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
13 changes: 0 additions & 13 deletions intra/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
package intra

import (
"errors"
"fmt"
"math/rand"
"net"
Expand All @@ -26,10 +25,6 @@ const smmchSize = 24
// immediate is the wait time before sending a summary to the listener.
var immediate = time.Duration(0)

var (
errNoAddr = errors.New("nil addr")
)

// TODO: Propagate TCP RST using local.Abort(), on appropriate errors.
func upload(cid string, local net.Conn, remote net.Conn, ioch chan<- ioinfo) {
defer core.Recover(core.Exit11, "c.upload: "+cid)
Expand Down Expand Up @@ -284,14 +279,6 @@ func splitCidPidUid(decision *Mark) (cid, pid, uid string) {
return decision.CID, decision.PID, decision.UID
}

func ipp(addr net.Addr) (netip.AddrPort, error) {
var zeroaddr = netip.AddrPort{}
if addr == nil || core.IsNil(addr) {
return zeroaddr, errNoAddr
}
return netip.ParseAddrPort(addr.String())
}

func conn2str(a net.Conn, b net.Conn) string {
ar := a.RemoteAddr()
br := b.RemoteAddr()
Expand Down
1 change: 0 additions & 1 deletion intra/udpmux.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,6 @@ type muxTable struct {
}

type assocFn func(net, dst string) (net.PacketConn, error)
type dissocFn func(src netip.AddrPort)

func newMuxTable() *muxTable {
return &muxTable{t: make(map[netip.AddrPort]*muxer)}
Expand Down

1 comment on commit b9f26ee

@ignoramous
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#77

Please sign in to comment.