Move top-level packages into pkg

This commit is contained in:
Derek Parker
2017-02-08 08:00:44 -08:00
parent 26ad5f1d82
commit 53f0d24057
83 changed files with 53 additions and 52 deletions

View File

@ -14,13 +14,13 @@ import (
"syscall" "syscall"
"unicode" "unicode"
"github.com/derekparker/delve/config" "github.com/derekparker/delve/pkg/config"
"github.com/derekparker/delve/pkg/terminal"
"github.com/derekparker/delve/pkg/version"
"github.com/derekparker/delve/service" "github.com/derekparker/delve/service"
"github.com/derekparker/delve/service/api" "github.com/derekparker/delve/service/api"
"github.com/derekparker/delve/service/rpc2" "github.com/derekparker/delve/service/rpc2"
"github.com/derekparker/delve/service/rpccommon" "github.com/derekparker/delve/service/rpccommon"
"github.com/derekparker/delve/terminal"
"github.com/derekparker/delve/version"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View File

@ -8,7 +8,7 @@ import (
"runtime" "runtime"
"testing" "testing"
protest "github.com/derekparker/delve/proc/test" protest "github.com/derekparker/delve/pkg/proc/test"
"github.com/derekparker/delve/service/rpc2" "github.com/derekparker/delve/service/rpc2"
) )

View File

@ -2,7 +2,7 @@ package main
import ( import (
"github.com/derekparker/delve/cmd/dlv/cmds" "github.com/derekparker/delve/cmd/dlv/cmds"
"github.com/derekparker/delve/version" "github.com/derekparker/delve/pkg/version"
) )
// Build is the git sha of this binaries build. // Build is the git sha of this binaries build.

View File

@ -7,7 +7,7 @@ import (
"bytes" "bytes"
"encoding/binary" "encoding/binary"
"github.com/derekparker/delve/dwarf/util" "github.com/derekparker/delve/pkg/dwarf/util"
) )
type parsefunc func(*parseContext) parsefunc type parsefunc func(*parseContext) parsefunc

View File

@ -7,7 +7,7 @@ import (
"testing" "testing"
"github.com/davecheney/profile" "github.com/davecheney/profile"
"github.com/derekparker/delve/dwarf/frame" "github.com/derekparker/delve/pkg/dwarf/frame"
) )
func BenchmarkParse(b *testing.B) { func BenchmarkParse(b *testing.B) {

View File

@ -5,7 +5,7 @@ import (
"encoding/binary" "encoding/binary"
"fmt" "fmt"
"github.com/derekparker/delve/dwarf/util" "github.com/derekparker/delve/pkg/dwarf/util"
) )
type CurrentFrameAddress struct { type CurrentFrameAddress struct {

View File

@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"encoding/binary" "encoding/binary"
"github.com/derekparker/delve/dwarf/util" "github.com/derekparker/delve/pkg/dwarf/util"
) )
type DebugLinePrologue struct { type DebugLinePrologue struct {

View File

@ -47,7 +47,7 @@ const (
func TestDebugLinePrologueParser(t *testing.T) { func TestDebugLinePrologueParser(t *testing.T) {
// Test against known good values, from readelf --debug-dump=rawline _fixtures/testnextprog // Test against known good values, from readelf --debug-dump=rawline _fixtures/testnextprog
p, err := filepath.Abs("../../_fixtures/testnextprog") p, err := filepath.Abs("../../../_fixtures/testnextprog")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }

View File

@ -6,7 +6,7 @@ import (
"errors" "errors"
"fmt" "fmt"
"github.com/derekparker/delve/dwarf/util" "github.com/derekparker/delve/pkg/dwarf/util"
) )
type Location struct { type Location struct {

View File

@ -6,7 +6,7 @@ import (
"errors" "errors"
"fmt" "fmt"
"github.com/derekparker/delve/dwarf/util" "github.com/derekparker/delve/pkg/dwarf/util"
) )
const ( const (

View File

@ -4,7 +4,7 @@ import (
"errors" "errors"
"fmt" "fmt"
"github.com/derekparker/delve/dwarf/op" "github.com/derekparker/delve/pkg/dwarf/op"
"golang.org/x/debug/dwarf" "golang.org/x/debug/dwarf"
) )

View File

@ -12,7 +12,7 @@ import (
"go/token" "go/token"
"reflect" "reflect"
"github.com/derekparker/delve/dwarf/reader" "github.com/derekparker/delve/pkg/dwarf/reader"
"golang.org/x/debug/dwarf" "golang.org/x/debug/dwarf"
) )

View File

@ -16,9 +16,9 @@ import (
"sync" "sync"
"time" "time"
"github.com/derekparker/delve/dwarf/frame" "github.com/derekparker/delve/pkg/dwarf/frame"
"github.com/derekparker/delve/dwarf/line" "github.com/derekparker/delve/pkg/dwarf/line"
"github.com/derekparker/delve/dwarf/reader" "github.com/derekparker/delve/pkg/dwarf/reader"
"golang.org/x/debug/dwarf" "golang.org/x/debug/dwarf"
) )

View File

@ -17,8 +17,8 @@ import (
"golang.org/x/debug/macho" "golang.org/x/debug/macho"
"github.com/derekparker/delve/dwarf/frame" "github.com/derekparker/delve/pkg/dwarf/frame"
"github.com/derekparker/delve/dwarf/line" "github.com/derekparker/delve/pkg/dwarf/line"
sys "golang.org/x/sys/unix" sys "golang.org/x/sys/unix"
) )

View File

@ -18,8 +18,8 @@ import (
sys "golang.org/x/sys/unix" sys "golang.org/x/sys/unix"
"github.com/derekparker/delve/dwarf/frame" "github.com/derekparker/delve/pkg/dwarf/frame"
"github.com/derekparker/delve/dwarf/line" "github.com/derekparker/delve/pkg/dwarf/line"
"golang.org/x/debug/elf" "golang.org/x/debug/elf"
) )

View File

@ -17,7 +17,7 @@ import (
"testing" "testing"
"time" "time"
protest "github.com/derekparker/delve/proc/test" protest "github.com/derekparker/delve/pkg/proc/test"
) )
var normalLoadConfig = LoadConfig{true, 1, 64, 64, -1} var normalLoadConfig = LoadConfig{true, 1, 64, 64, -1}
@ -2442,7 +2442,7 @@ func TestStacktraceWithBarriers(t *testing.T) {
assertNoError(p.Continue(), t, "Continue()") assertNoError(p.Continue(), t, "Continue()")
gs, err := p.GoroutinesInfo() gs, err := p.GoroutinesInfo()
assertNoError(err, t, "GoroutinesInfo()") assertNoError(err, t, "GoroutinesInfo()")
for _, th := range p.Threads { for _, th := range p.threads {
if th.CurrentBreakpoint == nil { if th.CurrentBreakpoint == nil {
continue continue
} }

View File

@ -7,7 +7,7 @@ import (
"testing" "testing"
"time" "time"
protest "github.com/derekparker/delve/proc/test" protest "github.com/derekparker/delve/pkg/proc/test"
) )
func TestIssue419(t *testing.T) { func TestIssue419(t *testing.T) {

View File

@ -14,8 +14,8 @@ import (
sys "golang.org/x/sys/windows" sys "golang.org/x/sys/windows"
"github.com/derekparker/delve/dwarf/frame" "github.com/derekparker/delve/pkg/dwarf/frame"
"github.com/derekparker/delve/dwarf/line" "github.com/derekparker/delve/pkg/dwarf/line"
"golang.org/x/debug/dwarf" "golang.org/x/debug/dwarf"
) )

View File

@ -5,7 +5,7 @@ import (
"errors" "errors"
"fmt" "fmt"
"github.com/derekparker/delve/dwarf/frame" "github.com/derekparker/delve/pkg/dwarf/frame"
) )
// This code is partly adaped from runtime.gentraceback in // This code is partly adaped from runtime.gentraceback in

View File

@ -14,7 +14,7 @@ import (
"sync" "sync"
"unsafe" "unsafe"
"github.com/derekparker/delve/dwarf/reader" "github.com/derekparker/delve/pkg/dwarf/reader"
"golang.org/x/debug/dwarf" "golang.org/x/debug/dwarf"
) )

View File

@ -13,8 +13,8 @@ import (
"strings" "strings"
"unsafe" "unsafe"
"github.com/derekparker/delve/dwarf/op" "github.com/derekparker/delve/pkg/dwarf/op"
"github.com/derekparker/delve/dwarf/reader" "github.com/derekparker/delve/pkg/dwarf/reader"
"golang.org/x/debug/dwarf" "golang.org/x/debug/dwarf"
) )

View File

@ -5,7 +5,7 @@ import (
"go/ast" "go/ast"
"time" "time"
"github.com/derekparker/delve/proc" "github.com/derekparker/delve/pkg/proc"
) )
// Target represents the target of the debugger. This // Target represents the target of the debugger. This

View File

@ -10,7 +10,7 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/derekparker/delve/proc/test" "github.com/derekparker/delve/pkg/proc/test"
"github.com/derekparker/delve/service" "github.com/derekparker/delve/service"
"github.com/derekparker/delve/service/api" "github.com/derekparker/delve/service/api"
"github.com/derekparker/delve/service/rpc2" "github.com/derekparker/delve/service/rpc2"

View File

@ -12,7 +12,7 @@ import (
"github.com/peterh/liner" "github.com/peterh/liner"
"github.com/derekparker/delve/config" "github.com/derekparker/delve/pkg/config"
"github.com/derekparker/delve/service" "github.com/derekparker/delve/service"
) )

View File

@ -4,7 +4,7 @@ import (
"runtime" "runtime"
"testing" "testing"
"github.com/derekparker/delve/config" "github.com/derekparker/delve/pkg/config"
) )
type tRule struct { type tRule struct {

View File

@ -9,7 +9,8 @@ import (
"reflect" "reflect"
"strconv" "strconv"
"github.com/derekparker/delve/proc" "github.com/derekparker/delve/pkg/proc"
"golang.org/x/debug/dwarf" "golang.org/x/debug/dwarf"
) )

View File

@ -8,7 +8,7 @@ import (
"strconv" "strconv"
"unicode" "unicode"
"github.com/derekparker/delve/proc" "github.com/derekparker/delve/pkg/proc"
) )
var NotExecutableErr = proc.NotExecutableErr var NotExecutableErr = proc.NotExecutableErr

View File

@ -14,7 +14,7 @@ import (
"time" "time"
"github.com/derekparker/delve/pkg/target" "github.com/derekparker/delve/pkg/target"
"github.com/derekparker/delve/proc" "github.com/derekparker/delve/pkg/proc"
"github.com/derekparker/delve/service/api" "github.com/derekparker/delve/service/api"
) )

View File

@ -10,7 +10,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/derekparker/delve/proc" "github.com/derekparker/delve/pkg/proc"
"github.com/derekparker/delve/service/api" "github.com/derekparker/delve/service/api"
) )

View File

@ -57,12 +57,12 @@ func TestFunctionLocationParsing(t *testing.T) {
assertNormalLocationSpec(t, "Continue:10", NormalLocationSpec{"Continue", &FuncLocationSpec{BaseName: "Continue"}, 10}) assertNormalLocationSpec(t, "Continue:10", NormalLocationSpec{"Continue", &FuncLocationSpec{BaseName: "Continue"}, 10})
// Function locations, package paths, no line offsets // Function locations, package paths, no line offsets
assertNormalLocationSpec(t, "github.com/derekparker/delve/proc.(*Process).Continue", NormalLocationSpec{"github.com/derekparker/delve/proc.(*Process).Continue", &FuncLocationSpec{PackageName: "github.com/derekparker/delve/proc", ReceiverName: "Process", BaseName: "Continue"}, -1}) assertNormalLocationSpec(t, "github.com/derekparker/delve/pkg/proc.(*Process).Continue", NormalLocationSpec{"github.com/derekparker/delve/pkg/proc.(*Process).Continue", &FuncLocationSpec{PackageName: "github.com/derekparker/delve/pkg/proc", ReceiverName: "Process", BaseName: "Continue"}, -1})
assertNormalLocationSpec(t, "github.com/derekparker/delve/proc.Process.Continue", NormalLocationSpec{"github.com/derekparker/delve/proc.Process.Continue", &FuncLocationSpec{PackageName: "github.com/derekparker/delve/proc", ReceiverName: "Process", BaseName: "Continue"}, -1}) assertNormalLocationSpec(t, "github.com/derekparker/delve/pkg/proc.Process.Continue", NormalLocationSpec{"github.com/derekparker/delve/pkg/proc.Process.Continue", &FuncLocationSpec{PackageName: "github.com/derekparker/delve/pkg/proc", ReceiverName: "Process", BaseName: "Continue"}, -1})
assertNormalLocationSpec(t, "github.com/derekparker/delve/proc.Continue", NormalLocationSpec{"github.com/derekparker/delve/proc.Continue", &FuncLocationSpec{PackageName: "github.com/derekparker/delve/proc", BaseName: "Continue"}, -1}) assertNormalLocationSpec(t, "github.com/derekparker/delve/pkg/proc.Continue", NormalLocationSpec{"github.com/derekparker/delve/pkg/proc.Continue", &FuncLocationSpec{PackageName: "github.com/derekparker/delve/pkg/proc", BaseName: "Continue"}, -1})
// Function locations, package paths, line offsets // Function locations, package paths, line offsets
assertNormalLocationSpec(t, "github.com/derekparker/delve/proc.(*Process).Continue:10", NormalLocationSpec{"github.com/derekparker/delve/proc.(*Process).Continue", &FuncLocationSpec{PackageName: "github.com/derekparker/delve/proc", ReceiverName: "Process", BaseName: "Continue"}, 10}) assertNormalLocationSpec(t, "github.com/derekparker/delve/pkg/proc.(*Process).Continue:10", NormalLocationSpec{"github.com/derekparker/delve/pkg/proc.(*Process).Continue", &FuncLocationSpec{PackageName: "github.com/derekparker/delve/pkg/proc", ReceiverName: "Process", BaseName: "Continue"}, 10})
assertNormalLocationSpec(t, "github.com/derekparker/delve/proc.Process.Continue:10", NormalLocationSpec{"github.com/derekparker/delve/proc.Process.Continue", &FuncLocationSpec{PackageName: "github.com/derekparker/delve/proc", ReceiverName: "Process", BaseName: "Continue"}, 10}) assertNormalLocationSpec(t, "github.com/derekparker/delve/pkg/proc.Process.Continue:10", NormalLocationSpec{"github.com/derekparker/delve/pkg/proc.Process.Continue", &FuncLocationSpec{PackageName: "github.com/derekparker/delve/pkg/proc", ReceiverName: "Process", BaseName: "Continue"}, 10})
assertNormalLocationSpec(t, "github.com/derekparker/delve/proc.Continue:10", NormalLocationSpec{"github.com/derekparker/delve/proc.Continue", &FuncLocationSpec{PackageName: "github.com/derekparker/delve/proc", BaseName: "Continue"}, 10}) assertNormalLocationSpec(t, "github.com/derekparker/delve/pkg/proc.Continue:10", NormalLocationSpec{"github.com/derekparker/delve/pkg/proc.Continue", &FuncLocationSpec{PackageName: "github.com/derekparker/delve/pkg/proc", BaseName: "Continue"}, 10})
} }

View File

@ -4,7 +4,7 @@ import (
"errors" "errors"
"fmt" "fmt"
"github.com/derekparker/delve/proc" "github.com/derekparker/delve/pkg/proc"
"github.com/derekparker/delve/service" "github.com/derekparker/delve/service"
"github.com/derekparker/delve/service/api" "github.com/derekparker/delve/service/api"
"github.com/derekparker/delve/service/debugger" "github.com/derekparker/delve/service/debugger"

View File

@ -16,12 +16,12 @@ import (
"unicode" "unicode"
"unicode/utf8" "unicode/utf8"
"github.com/derekparker/delve/pkg/version"
"github.com/derekparker/delve/service" "github.com/derekparker/delve/service"
"github.com/derekparker/delve/service/api" "github.com/derekparker/delve/service/api"
"github.com/derekparker/delve/service/debugger" "github.com/derekparker/delve/service/debugger"
"github.com/derekparker/delve/service/rpc1" "github.com/derekparker/delve/service/rpc1"
"github.com/derekparker/delve/service/rpc2" "github.com/derekparker/delve/service/rpc2"
"github.com/derekparker/delve/version"
) )
// ServerImpl implements a JSON-RPC server that can switch between two // ServerImpl implements a JSON-RPC server that can switch between two

View File

@ -11,9 +11,9 @@ import (
"testing" "testing"
"time" "time"
protest "github.com/derekparker/delve/proc/test" protest "github.com/derekparker/delve/pkg/proc/test"
"github.com/derekparker/delve/proc" "github.com/derekparker/delve/pkg/proc"
"github.com/derekparker/delve/service" "github.com/derekparker/delve/service"
"github.com/derekparker/delve/service/api" "github.com/derekparker/delve/service/api"
"github.com/derekparker/delve/service/rpc1" "github.com/derekparker/delve/service/rpc1"

View File

@ -12,9 +12,9 @@ import (
"testing" "testing"
"time" "time"
protest "github.com/derekparker/delve/proc/test" protest "github.com/derekparker/delve/pkg/proc/test"
"github.com/derekparker/delve/proc" "github.com/derekparker/delve/pkg/proc"
"github.com/derekparker/delve/service" "github.com/derekparker/delve/service"
"github.com/derekparker/delve/service/api" "github.com/derekparker/delve/service/api"
"github.com/derekparker/delve/service/rpc2" "github.com/derekparker/delve/service/rpc2"

View File

@ -7,10 +7,10 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/derekparker/delve/proc" "github.com/derekparker/delve/pkg/proc"
"github.com/derekparker/delve/service/api" "github.com/derekparker/delve/service/api"
protest "github.com/derekparker/delve/proc/test" protest "github.com/derekparker/delve/pkg/proc/test"
) )
var pnormalLoadConfig = proc.LoadConfig{true, 1, 64, 64, -1} var pnormalLoadConfig = proc.LoadConfig{true, 1, 64, 64, -1}