fix: import path

This commit is contained in:
Evrins Hu 2020-07-13 14:31:19 +08:00
parent 5532b49f7e
commit 11bff25cc8
36 changed files with 49 additions and 49 deletions

View file

@ -3,8 +3,8 @@ package adb
import ( import (
"strconv" "strconv"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
"goadb/wire" "github.com/Evrins/goadb/wire"
) )
/* /*

View file

@ -3,7 +3,7 @@ package adb
import ( import (
"testing" "testing"
"goadb/wire" "github.com/Evrins/goadb/wire"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -7,8 +7,8 @@ import (
"strings" "strings"
"time" "time"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
"goadb/wire" "github.com/Evrins/goadb/wire"
) )
// MtimeOfClose should be passed to OpenWrite to set the file modification time to the time the Close // MtimeOfClose should be passed to OpenWrite to set the file modification time to the time the Close

View file

@ -4,7 +4,7 @@ import (
"bufio" "bufio"
"strings" "strings"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
) )
type DeviceInfo struct { type DeviceInfo struct {

View file

@ -1,6 +1,6 @@
package adb package adb
import "goadb/internal/errors" import "github.com/Evrins/goadb/internal/errors"
// DeviceState represents one of the 3 possible states adb will report devices. // DeviceState represents one of the 3 possible states adb will report devices.
// A device can be communicated with when it's in StateOnline. // A device can be communicated with when it's in StateOnline.

View file

@ -3,8 +3,8 @@ package adb
import ( import (
"testing" "testing"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
"goadb/wire" "github.com/Evrins/goadb/wire"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -8,8 +8,8 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
"goadb/wire" "github.com/Evrins/goadb/wire"
) )
/* /*

View file

@ -3,8 +3,8 @@ package adb
import ( import (
"testing" "testing"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
"goadb/wire" "github.com/Evrins/goadb/wire"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -5,8 +5,8 @@ import (
"net" "net"
"runtime" "runtime"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
"goadb/wire" "github.com/Evrins/goadb/wire"
) )
// Dialer knows how to create connections to an adb server. // Dialer knows how to create connections to an adb server.

View file

@ -5,7 +5,7 @@ import (
"os" "os"
"time" "time"
"goadb/wire" "github.com/Evrins/goadb/wire"
) )
// DirEntry holds information about a directory entry on a device. // DirEntry holds information about a directory entry on a device.

View file

@ -1,6 +1,6 @@
package adb package adb
import "goadb/internal/errors" import "github.com/Evrins/goadb/internal/errors"
type ErrCode errors.ErrCode type ErrCode errors.ErrCode

View file

@ -7,8 +7,8 @@ import (
"os/exec" "os/exec"
"strings" "strings"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
"goadb/wire" "github.com/Evrins/goadb/wire"
) )
const ( const (

View file

@ -4,8 +4,8 @@ import (
"io" "io"
"strings" "strings"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
"goadb/wire" "github.com/Evrins/goadb/wire"
) )
// MockServer implements Server, Scanner, and Sender. // MockServer implements Server, Scanner, and Sender.

View file

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"testing" "testing"
"goadb/wire" "github.com/Evrins/goadb/wire"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -5,8 +5,8 @@ import (
"os" "os"
"time" "time"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
"goadb/wire" "github.com/Evrins/goadb/wire"
) )
var zeroTime = time.Unix(0, 0).UTC() var zeroTime = time.Unix(0, 0).UTC()

View file

@ -7,8 +7,8 @@ import (
"testing" "testing"
"time" "time"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
"goadb/wire" "github.com/Evrins/goadb/wire"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"

View file

@ -3,8 +3,8 @@ package adb
import ( import (
"io" "io"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
"goadb/wire" "github.com/Evrins/goadb/wire"
) )
// syncFileReader wraps a SyncConn that has requested to receive a file. // syncFileReader wraps a SyncConn that has requested to receive a file.

View file

@ -6,7 +6,7 @@ import (
"strings" "strings"
"testing" "testing"
"goadb/wire" "github.com/Evrins/goadb/wire"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -6,8 +6,8 @@ import (
"os" "os"
"time" "time"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
"goadb/wire" "github.com/Evrins/goadb/wire"
) )
// syncFileWriter wraps a SyncConn that has requested to send a file. // syncFileWriter wraps a SyncConn that has requested to send a file.

View file

@ -8,7 +8,7 @@ import (
"encoding/binary" "encoding/binary"
"strings" "strings"
"goadb/wire" "github.com/Evrins/goadb/wire"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -6,7 +6,7 @@ import (
"regexp" "regexp"
"strings" "strings"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
) )
var ( var (

BIN
cmd/adb/adb Executable file

Binary file not shown.

View file

@ -2,7 +2,7 @@ package main
import ( import (
"fmt" "fmt"
"goadb/adb" "github.com/Evrins/goadb/adb"
"io" "io"
"os" "os"
"path/filepath" "path/filepath"

View file

@ -4,12 +4,12 @@ package main
import ( import (
"flag" "flag"
"fmt" "fmt"
"goadb/adb" "github.com/Evrins/goadb/adb"
"io/ioutil" "io/ioutil"
"log" "log"
"time" "time"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
) )
var ( var (

View file

@ -5,13 +5,13 @@ import (
"bufio" "bufio"
"flag" "flag"
"fmt" "fmt"
"goadb/adb" "github.com/Evrins/goadb/adb"
"io" "io"
"log" "log"
"os" "os"
"strings" "strings"
"goadb/wire" "github.com/Evrins/goadb/wire"
) )
var port = flag.Int("p", adb.AdbPort, "`port` the adb server is listening on") var port = flag.Int("p", adb.AdbPort, "`port` the adb server is listening on")

2
go.mod
View file

@ -1,4 +1,4 @@
module goadb module github.com/Evrins/goadb
go 1.14 go 1.14

View file

@ -1,6 +1,6 @@
package wire package wire
import "goadb/internal/errors" import "github.com/Evrins/goadb/internal/errors"
const ( const (
// The official implementation of adb imposes an undocumented 255-byte limit // The official implementation of adb imposes an undocumented 255-byte limit

View file

@ -6,7 +6,7 @@ import (
"io/ioutil" "io/ioutil"
"strconv" "strconv"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
) )
// TODO(zach): All EOF errors returned from networoking calls should use ConnectionResetError. // TODO(zach): All EOF errors returned from networoking calls should use ConnectionResetError.

View file

@ -7,7 +7,7 @@ import (
"io/ioutil" "io/ioutil"
"testing" "testing"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"io" "io"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
) )
// Sender sends messages to the server. // Sender sends messages to the server.

View file

@ -1,6 +1,6 @@
package wire package wire
import "goadb/internal/errors" import "github.com/Evrins/goadb/internal/errors"
const ( const (
// Chunks cannot be longer than 64k. // Chunks cannot be longer than 64k.

View file

@ -6,7 +6,7 @@ import (
"os" "os"
"time" "time"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
) )
type SyncScanner interface { type SyncScanner interface {

View file

@ -6,7 +6,7 @@ import (
"os" "os"
"time" "time"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
) )
type SyncSender interface { type SyncSender interface {

View file

@ -7,7 +7,7 @@ import (
"testing" "testing"
"time" "time"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -6,7 +6,7 @@ import (
"regexp" "regexp"
"sync" "sync"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
) )
// ErrorResponseDetails is an error message returned by the server for a particular request. // ErrorResponseDetails is an error message returned by the server for a particular request.

View file

@ -3,7 +3,7 @@ package wire
import ( import (
"testing" "testing"
"goadb/internal/errors" "github.com/Evrins/goadb/internal/errors"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )