mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2025-09-26 20:31:11 +08:00
Optimize imports
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/AlexxIT/go2rtc/www"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/AlexxIT/go2rtc/www"
|
||||||
)
|
)
|
||||||
|
|
||||||
func initStatic(staticDir string) {
|
func initStatic(staticDir string) {
|
||||||
|
@@ -2,9 +2,10 @@ package webtorrent
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"net/http"
|
||||||
|
|
||||||
"github.com/AlexxIT/go2rtc/pkg/webtorrent"
|
"github.com/AlexxIT/go2rtc/pkg/webtorrent"
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
"net/http"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var upgrader *websocket.Upgrader
|
var upgrader *websocket.Upgrader
|
||||||
|
2
main.go
2
main.go
@@ -81,7 +81,7 @@ func main() {
|
|||||||
mpegts.Init() // mpegts passive source
|
mpegts.Init() // mpegts passive source
|
||||||
roborock.Init() // roborock source
|
roborock.Init() // roborock source
|
||||||
homekit.Init() // homekit source
|
homekit.Init() // homekit source
|
||||||
ring.Init() // ring source
|
ring.Init() // ring source
|
||||||
nest.Init() // nest source
|
nest.Init() // nest source
|
||||||
bubble.Init() // bubble source
|
bubble.Init() // bubble source
|
||||||
expr.Init() // expr source
|
expr.Init() // expr source
|
||||||
|
@@ -3,6 +3,7 @@ package h265
|
|||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
|
|
||||||
"github.com/AlexxIT/go2rtc/pkg/core"
|
"github.com/AlexxIT/go2rtc/pkg/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -2,8 +2,9 @@ package h265
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"github.com/AlexxIT/go2rtc/pkg/h264"
|
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
|
"github.com/AlexxIT/go2rtc/pkg/h264"
|
||||||
)
|
)
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@@ -2,8 +2,9 @@ package hass
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/gorilla/websocket"
|
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/gorilla/websocket"
|
||||||
)
|
)
|
||||||
|
|
||||||
type API struct {
|
type API struct {
|
||||||
|
@@ -1,8 +1,9 @@
|
|||||||
package mdns
|
package mdns
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/stretchr/testify/require"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDiscovery(t *testing.T) {
|
func TestDiscovery(t *testing.T) {
|
||||||
|
@@ -3,10 +3,11 @@ package mjpeg
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"github.com/AlexxIT/go2rtc/pkg/core"
|
|
||||||
"github.com/pion/rtp"
|
|
||||||
"image"
|
"image"
|
||||||
"image/jpeg"
|
"image/jpeg"
|
||||||
|
|
||||||
|
"github.com/AlexxIT/go2rtc/pkg/core"
|
||||||
|
"github.com/pion/rtp"
|
||||||
)
|
)
|
||||||
|
|
||||||
func RTPDepay(handlerFunc core.HandlerFunc) core.HandlerFunc {
|
func RTPDepay(handlerFunc core.HandlerFunc) core.HandlerFunc {
|
||||||
|
@@ -3,10 +3,11 @@ package ngrok
|
|||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"github.com/AlexxIT/go2rtc/pkg/core"
|
|
||||||
"io"
|
"io"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/AlexxIT/go2rtc/pkg/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Ngrok struct {
|
type Ngrok struct {
|
||||||
|
@@ -1,9 +1,10 @@
|
|||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
v2 "github.com/AlexxIT/go2rtc/pkg/pcm"
|
v2 "github.com/AlexxIT/go2rtc/pkg/pcm"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestPCMUtoPCM(t *testing.T) {
|
func TestPCMUtoPCM(t *testing.T) {
|
||||||
|
@@ -7,11 +7,12 @@ import (
|
|||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/AlexxIT/go2rtc/pkg/core"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/AlexxIT/go2rtc/pkg/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UserInfo struct {
|
type UserInfo struct {
|
||||||
|
@@ -5,10 +5,11 @@ import (
|
|||||||
"crypto/sha1"
|
"crypto/sha1"
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/AlexxIT/go2rtc/pkg/tcp"
|
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/AlexxIT/go2rtc/pkg/tcp"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Dial(address string) (net.Conn, error) {
|
func Dial(address string) (net.Conn, error) {
|
||||||
|
@@ -3,10 +3,11 @@ package webtorrent
|
|||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/AlexxIT/go2rtc/pkg/core"
|
|
||||||
"github.com/gorilla/websocket"
|
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/AlexxIT/go2rtc/pkg/core"
|
||||||
|
"github.com/gorilla/websocket"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Server struct {
|
type Server struct {
|
||||||
|
Reference in New Issue
Block a user