Skip to content

Commit

Permalink
Refactor imports and module name
Browse files Browse the repository at this point in the history
  • Loading branch information
smart-servant committed May 2, 2020
1 parent 8c30a7a commit 3032dce
Show file tree
Hide file tree
Showing 30 changed files with 69 additions and 68 deletions.
2 changes: 1 addition & 1 deletion configure/channel.go
Expand Up @@ -3,7 +3,7 @@ package configure
import (
"fmt"

"livego/utils/uid"
"github.com/gwuhaolin/livego/utils/uid"

"github.com/go-redis/redis/v7"
"github.com/patrickmn/go-cache"
Expand Down
2 changes: 1 addition & 1 deletion container/flv/demuxer.go
Expand Up @@ -2,7 +2,7 @@ package flv

import (
"fmt"
"livego/av"
"github.com/gwuhaolin/livego/av"
)

var (
Expand Down
10 changes: 5 additions & 5 deletions container/flv/muxer.go
Expand Up @@ -7,11 +7,11 @@ import (
"strings"
"time"

"livego/av"
"livego/configure"
"livego/protocol/amf"
"livego/utils/pio"
"livego/utils/uid"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/configure"
"github.com/gwuhaolin/livego/protocol/amf"
"github.com/gwuhaolin/livego/utils/pio"
"github.com/gwuhaolin/livego/utils/uid"

log "github.com/sirupsen/logrus"
)
Expand Down
2 changes: 1 addition & 1 deletion container/flv/tag.go
Expand Up @@ -3,7 +3,7 @@ package flv
import (
"fmt"

"livego/av"
"github.com/gwuhaolin/livego/av"
)

type flvTag struct {
Expand Down
2 changes: 1 addition & 1 deletion container/ts/muxer.go
Expand Up @@ -3,7 +3,7 @@ package ts
import (
"io"

"livego/av"
"github.com/gwuhaolin/livego/av"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion container/ts/muxer_test.go
Expand Up @@ -3,7 +3,7 @@ package ts
import (
"testing"

"livego/av"
"github.com/gwuhaolin/livego/av"

"github.com/stretchr/testify/assert"
)
Expand Down
3 changes: 2 additions & 1 deletion go.mod
@@ -1,4 +1,4 @@
module livego
module github.com/gwuhaolin/livego

go 1.13

Expand All @@ -14,6 +14,7 @@ require (
github.com/sirupsen/logrus v1.5.0
github.com/spf13/pflag v1.0.3
github.com/spf13/viper v1.6.3
github.com/stretchr/objx v0.1.1 // indirect
github.com/stretchr/testify v1.4.0
github.com/urfave/negroni v1.0.0 // indirect
)
10 changes: 5 additions & 5 deletions main.go
Expand Up @@ -2,11 +2,11 @@ package main

import (
"fmt"
"livego/configure"
"livego/protocol/api"
"livego/protocol/hls"
"livego/protocol/httpflv"
"livego/protocol/rtmp"
"github.com/gwuhaolin/livego/configure"
"github.com/gwuhaolin/livego/protocol/api"
"github.com/gwuhaolin/livego/protocol/hls"
"github.com/gwuhaolin/livego/protocol/httpflv"
"github.com/gwuhaolin/livego/protocol/rtmp"
"net"
"path"
"runtime"
Expand Down
2 changes: 1 addition & 1 deletion parser/aac/parser.go
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"io"

"livego/av"
"github.com/gwuhaolin/livego/av"
)

type mpegExtension struct {
Expand Down
8 changes: 4 additions & 4 deletions parser/parser.go
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"io"

"livego/av"
"livego/parser/aac"
"livego/parser/h264"
"livego/parser/mp3"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/parser/aac"
"github.com/gwuhaolin/livego/parser/h264"
"github.com/gwuhaolin/livego/parser/mp3"
)

var (
Expand Down
8 changes: 4 additions & 4 deletions protocol/api/api.go
Expand Up @@ -6,10 +6,10 @@ import (
"net"
"net/http"

"livego/av"
"livego/configure"
"livego/protocol/rtmp"
"livego/protocol/rtmp/rtmprelay"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/configure"
"github.com/gwuhaolin/livego/protocol/rtmp"
"github.com/gwuhaolin/livego/protocol/rtmp/rtmprelay"

jwtmiddleware "github.com/auth0/go-jwt-middleware"
"github.com/dgrijalva/jwt-go"
Expand Down
4 changes: 2 additions & 2 deletions protocol/hls/hls.go
Expand Up @@ -2,15 +2,15 @@ package hls

import (
"fmt"
"livego/configure"
"github.com/gwuhaolin/livego/configure"
"net"
"net/http"
"path"
"strconv"
"strings"
"time"

"livego/av"
"github.com/gwuhaolin/livego/av"

cmap "github.com/orcaman/concurrent-map"
log "github.com/sirupsen/logrus"
Expand Down
10 changes: 5 additions & 5 deletions protocol/hls/source.go
Expand Up @@ -3,13 +3,13 @@ package hls
import (
"bytes"
"fmt"
"livego/configure"
"github.com/gwuhaolin/livego/configure"
"time"

"livego/av"
"livego/container/flv"
"livego/container/ts"
"livego/parser"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/container/flv"
"github.com/gwuhaolin/livego/container/ts"
"github.com/gwuhaolin/livego/parser"

log "github.com/sirupsen/logrus"
)
Expand Down
4 changes: 2 additions & 2 deletions protocol/httpflv/server.go
Expand Up @@ -6,8 +6,8 @@ import (
"net/http"
"strings"

"livego/av"
"livego/protocol/rtmp"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/protocol/rtmp"

log "github.com/sirupsen/logrus"
)
Expand Down
8 changes: 4 additions & 4 deletions protocol/httpflv/writer.go
Expand Up @@ -5,10 +5,10 @@ import (
"net/http"
"time"

"livego/av"
"livego/protocol/amf"
"livego/utils/pio"
"livego/utils/uid"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/protocol/amf"
"github.com/gwuhaolin/livego/utils/pio"
"github.com/gwuhaolin/livego/utils/uid"

log "github.com/sirupsen/logrus"
)
Expand Down
4 changes: 2 additions & 2 deletions protocol/rtmp/cache/cache.go
@@ -1,8 +1,8 @@
package cache

import (
"livego/av"
"livego/configure"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/configure"
)

type Cache struct {
Expand Down
2 changes: 1 addition & 1 deletion protocol/rtmp/cache/gop.go
Expand Up @@ -3,7 +3,7 @@ package cache
import (
"fmt"

"livego/av"
"github.com/gwuhaolin/livego/av"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions protocol/rtmp/cache/special.go
Expand Up @@ -3,8 +3,8 @@ package cache
import (
"bytes"

"livego/av"
"livego/protocol/amf"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/protocol/amf"

log "github.com/sirupsen/logrus"
)
Expand Down
4 changes: 2 additions & 2 deletions protocol/rtmp/core/chunk_stream.go
Expand Up @@ -4,8 +4,8 @@ import (
"encoding/binary"
"fmt"

"livego/av"
"livego/utils/pool"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/utils/pool"
)

type ChunkStream struct {
Expand Down
2 changes: 1 addition & 1 deletion protocol/rtmp/core/chunk_stream_test.go
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"testing"

"livego/utils/pool"
"github.com/gwuhaolin/livego/utils/pool"

"github.com/stretchr/testify/assert"
)
Expand Down
4 changes: 2 additions & 2 deletions protocol/rtmp/core/conn.go
Expand Up @@ -5,8 +5,8 @@ import (
"net"
"time"

"livego/utils/pio"
"livego/utils/pool"
"github.com/gwuhaolin/livego/utils/pio"
"github.com/gwuhaolin/livego/utils/pool"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions protocol/rtmp/core/conn_client.go
Expand Up @@ -9,8 +9,8 @@ import (
neturl "net/url"
"strings"

"livego/av"
"livego/protocol/amf"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/protocol/amf"

log "github.com/sirupsen/logrus"
)
Expand Down
4 changes: 2 additions & 2 deletions protocol/rtmp/core/conn_server.go
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"io"

"livego/av"
"livego/protocol/amf"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/protocol/amf"

log "github.com/sirupsen/logrus"
)
Expand Down
2 changes: 1 addition & 1 deletion protocol/rtmp/core/conn_test.go
Expand Up @@ -5,7 +5,7 @@ import (
"io"
"testing"

"livego/utils/pool"
"github.com/gwuhaolin/livego/utils/pool"

"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion protocol/rtmp/core/handshake.go
Expand Up @@ -10,7 +10,7 @@ import (

"time"

"livego/utils/pio"
"github.com/gwuhaolin/livego/utils/pio"
)

var (
Expand Down
10 changes: 5 additions & 5 deletions protocol/rtmp/rtmp.go
Expand Up @@ -8,12 +8,12 @@ import (
"strings"
"time"

"livego/utils/uid"
"github.com/gwuhaolin/livego/utils/uid"

"livego/av"
"livego/configure"
"livego/container/flv"
"livego/protocol/rtmp/core"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/configure"
"github.com/gwuhaolin/livego/container/flv"
"github.com/gwuhaolin/livego/protocol/rtmp/core"

log "github.com/sirupsen/logrus"
)
Expand Down
4 changes: 2 additions & 2 deletions protocol/rtmp/rtmprelay/rtmprelay.go
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"io"

"livego/protocol/amf"
"livego/protocol/rtmp/core"
"github.com/gwuhaolin/livego/protocol/amf"
"github.com/gwuhaolin/livego/protocol/rtmp/core"

log "github.com/sirupsen/logrus"
)
Expand Down
6 changes: 3 additions & 3 deletions protocol/rtmp/rtmprelay/staticrelay.go
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"sync"

"livego/av"
"livego/configure"
"livego/protocol/rtmp/core"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/configure"
"github.com/gwuhaolin/livego/protocol/rtmp/core"

log "github.com/sirupsen/logrus"
)
Expand Down
6 changes: 3 additions & 3 deletions protocol/rtmp/stream.go
Expand Up @@ -5,9 +5,9 @@ import (
"strings"
"time"

"livego/av"
"livego/protocol/rtmp/cache"
"livego/protocol/rtmp/rtmprelay"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/protocol/rtmp/cache"
"github.com/gwuhaolin/livego/protocol/rtmp/rtmprelay"

cmap "github.com/orcaman/concurrent-map"
log "github.com/sirupsen/logrus"
Expand Down
2 changes: 1 addition & 1 deletion utils/queue/queue.go
Expand Up @@ -3,7 +3,7 @@ package queue
import (
"sync"

"livego/av"
"github.com/gwuhaolin/livego/av"
)

// Queue is a basic FIFO queue for Messages.
Expand Down

0 comments on commit 3032dce

Please sign in to comment.