Skip to content

Commit

Permalink
Remove unused functions (#28)
Browse files Browse the repository at this point in the history
Copied from other ingress/egress
  • Loading branch information
Sean-Der authored Dec 14, 2023
1 parent cb601e6 commit 634148a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
14 changes: 0 additions & 14 deletions pkg/errors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,13 @@
package errors

import (
"errors"

"github.com/livekit/psrpc"
)

var (
ErrNoConfig = psrpc.NewErrorf(psrpc.InvalidArgument, "missing config")
)

func New(err string) error {
return errors.New(err)
}

func Is(err, target error) bool {
return errors.Is(err, target)
}

func As(err error, target any) bool {
return errors.As(err, target)
}

func ErrCouldNotParseConfig(err error) psrpc.Error {
return psrpc.NewErrorf(psrpc.InvalidArgument, "could not parse config: %v", err)
}
4 changes: 2 additions & 2 deletions pkg/sip/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func TestService_AuthFailure(t *testing.T) {

require.NoError(t, s.Start())

sipUserAgent, err := sipgo.NewUA(sipgo.WithUserAgent("foo"))
sipUserAgent, err := sipgo.NewUA(sipgo.WithUserAgent(expectedFromUser))
require.NoError(t, err)

sipClient, err := sipgo.NewClient(sipUserAgent)
Expand All @@ -67,7 +67,7 @@ func TestService_AuthFailure(t *testing.T) {
offer, err := sdpGenerateOffer(localIP, 0xB0B)
require.NoError(t, err)

inviteRecipent := &sip.Uri{User: "bar", Host: sipServerAddress}
inviteRecipent := &sip.Uri{User: expectedToUser, Host: sipServerAddress}
inviteRequest := sip.NewRequest(sip.INVITE, inviteRecipent)
inviteRequest.SetDestination(sipServerAddress)
inviteRequest.SetBody(offer)
Expand Down

0 comments on commit 634148a

Please sign in to comment.