Optimize imports

This commit is contained in:
Alex X
2025-03-09 17:26:06 +03:00
parent 3954a555f8
commit c8f68f44af
13 changed files with 26 additions and 14 deletions

View File

@@ -1,8 +1,9 @@
package api
import (
"github.com/AlexxIT/go2rtc/www"
"net/http"
"github.com/AlexxIT/go2rtc/www"
)
func initStatic(staticDir string) {

View File

@@ -2,9 +2,10 @@ package webtorrent
import (
"fmt"
"net/http"
"github.com/AlexxIT/go2rtc/pkg/webtorrent"
"github.com/gorilla/websocket"
"net/http"
)
var upgrader *websocket.Upgrader

View File

@@ -81,7 +81,7 @@ func main() {
mpegts.Init() // mpegts passive source
roborock.Init() // roborock source
homekit.Init() // homekit source
ring.Init() // ring source
ring.Init() // ring source
nest.Init() // nest source
bubble.Init() // bubble source
expr.Init() // expr source

View File

@@ -3,6 +3,7 @@ package h265
import (
"encoding/base64"
"encoding/binary"
"github.com/AlexxIT/go2rtc/pkg/core"
)

View File

@@ -2,8 +2,9 @@ package h265
import (
"encoding/binary"
"github.com/AlexxIT/go2rtc/pkg/h264"
"math"
"github.com/AlexxIT/go2rtc/pkg/h264"
)
//

View File

@@ -2,8 +2,9 @@ package hass
import (
"errors"
"github.com/gorilla/websocket"
"os"
"github.com/gorilla/websocket"
)
type API struct {

View File

@@ -1,8 +1,9 @@
package mdns
import (
"github.com/stretchr/testify/require"
"testing"
"github.com/stretchr/testify/require"
)
func TestDiscovery(t *testing.T) {

View File

@@ -3,10 +3,11 @@ package mjpeg
import (
"bytes"
"encoding/binary"
"github.com/AlexxIT/go2rtc/pkg/core"
"github.com/pion/rtp"
"image"
"image/jpeg"
"github.com/AlexxIT/go2rtc/pkg/core"
"github.com/pion/rtp"
)
func RTPDepay(handlerFunc core.HandlerFunc) core.HandlerFunc {

View File

@@ -3,10 +3,11 @@ package ngrok
import (
"bufio"
"encoding/json"
"github.com/AlexxIT/go2rtc/pkg/core"
"io"
"os/exec"
"strings"
"github.com/AlexxIT/go2rtc/pkg/core"
)
type Ngrok struct {

View File

@@ -1,9 +1,10 @@
package v1
import (
"testing"
v2 "github.com/AlexxIT/go2rtc/pkg/pcm"
"github.com/stretchr/testify/require"
"testing"
)
func TestPCMUtoPCM(t *testing.T) {

View File

@@ -7,11 +7,12 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
"github.com/AlexxIT/go2rtc/pkg/core"
"net/http"
"net/url"
"strconv"
"time"
"github.com/AlexxIT/go2rtc/pkg/core"
)
type UserInfo struct {

View File

@@ -5,10 +5,11 @@ import (
"crypto/sha1"
"encoding/base64"
"errors"
"github.com/AlexxIT/go2rtc/pkg/tcp"
"net"
"net/http"
"strings"
"github.com/AlexxIT/go2rtc/pkg/tcp"
)
func Dial(address string) (net.Conn, error) {

View File

@@ -3,10 +3,11 @@ package webtorrent
import (
"encoding/base64"
"fmt"
"github.com/AlexxIT/go2rtc/pkg/core"
"github.com/gorilla/websocket"
"sync"
"time"
"github.com/AlexxIT/go2rtc/pkg/core"
"github.com/gorilla/websocket"
)
type Server struct {