style: gofmt/goimports новых файлов
Применить gofmt и goimports к файлам, добавленным в недавних разбиениях (udprelay/loop.go, udprelay/run.go, vkauth/token_oksession.go). Группы импортов теперь по порядку stdlib / external / internal.
This commit is contained in:
1 parent
71e3bb1f01
commit
c4b6774241
3 files changed
+12
-12
No files matched your search
@@ -5,8 +5,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
neturl "net/url"
|
neturl "net/url"
|
||||||
|
|
||||||
"github.com/samosvalishe/btp/internal/client/browserprofile"
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
|
"github.com/samosvalishe/btp/internal/client/browserprofile"
|
||||||
|
|
||||||
tlsclient "github.com/bogdanfinn/tls-client"
|
tlsclient "github.com/bogdanfinn/tls-client"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ import (
|
|||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/cbeuw/connutil"
|
||||||
|
"github.com/samosvalishe/btp/internal/client/vkauth"
|
||||||
"github.com/samosvalishe/btp/internal/proxy/common"
|
"github.com/samosvalishe/btp/internal/proxy/common"
|
||||||
"github.com/samosvalishe/btp/internal/stats"
|
"github.com/samosvalishe/btp/internal/stats"
|
||||||
"github.com/samosvalishe/btp/internal/wire/srtpmimicry"
|
"github.com/samosvalishe/btp/internal/wire/srtpmimicry"
|
||||||
"github.com/samosvalishe/btp/internal/client/vkauth"
|
|
||||||
"github.com/cbeuw/connutil"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// DTLSLoop keeps a single DTLS termination alive for streamID, restarting it
|
// DTLSLoop keeps a single DTLS termination alive for streamID, restarting it
|
||||||
|
|||||||
@@ -52,10 +52,10 @@ var ErrFatal = errors.New("udprelay: fatal error")
|
|||||||
// are owned by Run and exposed here so DTLSLoop/TURNLoop can share them when
|
// are owned by Run and exposed here so DTLSLoop/TURNLoop can share them when
|
||||||
// called directly (Run wires them automatically).
|
// called directly (Run wires them automatically).
|
||||||
type Deps struct {
|
type Deps struct {
|
||||||
DTLSDialer *dtlsdial.Dialer
|
DTLSDialer *dtlsdial.Dialer
|
||||||
Auth AuthHandler
|
Auth AuthHandler
|
||||||
Log logx.Logger
|
Log logx.Logger
|
||||||
ActiveLocalPeer *atomic.Value
|
ActiveLocalPeer *atomic.Value
|
||||||
ConnectedStreams *atomic.Int32
|
ConnectedStreams *atomic.Int32
|
||||||
// fatalCh is an internal signalling channel; set by Run, written by
|
// fatalCh is an internal signalling channel; set by Run, written by
|
||||||
// TURNLoop, and drained by Run to propagate the fatal error up.
|
// TURNLoop, and drained by Run to propagate the fatal error up.
|
||||||
@@ -94,12 +94,12 @@ func Run(ctx context.Context, dtlsDialer *dtlsdial.Dialer, auth AuthHandler, log
|
|||||||
fatalCh := make(chan error, 1)
|
fatalCh := make(chan error, 1)
|
||||||
var activeLocalPeer atomic.Value
|
var activeLocalPeer atomic.Value
|
||||||
deps := &Deps{
|
deps := &Deps{
|
||||||
DTLSDialer: dtlsDialer,
|
DTLSDialer: dtlsDialer,
|
||||||
Auth: auth,
|
Auth: auth,
|
||||||
Log: logger,
|
Log: logger,
|
||||||
ActiveLocalPeer: &activeLocalPeer,
|
ActiveLocalPeer: &activeLocalPeer,
|
||||||
ConnectedStreams: connectedStreams,
|
ConnectedStreams: connectedStreams,
|
||||||
fatalCh: fatalCh,
|
fatalCh: fatalCh,
|
||||||
}
|
}
|
||||||
|
|
||||||
// runCtx is cancelled when a fatal error is detected (via fatalCh), which
|
// runCtx is cancelled when a fatal error is detected (via fatalCh), which
|
||||||
|
|||||||
Reference in new issue
Block a user