更换package结构
This commit is contained in:
parent
1eb9512a5f
commit
f64c65069b
5
go.mod
5
go.mod
|
@ -1,8 +1,9 @@
|
|||
module github.com/474420502/focus
|
||||
module focus
|
||||
|
||||
go 1.12
|
||||
go 1.14
|
||||
|
||||
require (
|
||||
github.com/474420502/focus v0.8.1 // indirect
|
||||
github.com/Pallinder/go-randomdata v1.1.0
|
||||
github.com/davecgh/go-spew v1.1.1
|
||||
)
|
||||
|
|
2
go.sum
2
go.sum
|
@ -1,3 +1,5 @@
|
|||
github.com/474420502/focus v0.8.1 h1:PZwCgzcnxwx7ZZCWc/XKLVaZPH9e4YX9cP4ckyT2HDA=
|
||||
github.com/474420502/focus v0.8.1/go.mod h1:jrDXvK1CnUJ3PCR3ZJVYinbS2Yz5kM8OoAbCLe6AF7Y=
|
||||
github.com/Pallinder/go-randomdata v1.1.0 h1:gUubB1IEUliFmzjqjhf+bgkg1o6uoFIkRsP3VrhEcx8=
|
||||
github.com/Pallinder/go-randomdata v1.1.0/go.mod h1:yHmJgulpD2Nfrm0cR9tI/+oAgRqCQQixsA8HyRZfV9Y=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
|
|
|
@ -3,7 +3,8 @@ package arraylist
|
|||
import (
|
||||
"log"
|
||||
|
||||
"github.com/474420502/focus/list"
|
||||
"focus/list"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@ package linkedlist
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/474420502/focus/list"
|
||||
"focus/list"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ package plist
|
|||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"github.com/474420502/focus/list"
|
||||
"focus/compare"
|
||||
"focus/list"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
)
|
||||
|
||||
|
|
|
@ -7,7 +7,8 @@ import (
|
|||
"log"
|
||||
"testing"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package linkedhashmap
|
||||
|
||||
import (
|
||||
linkedlist "github.com/474420502/focus/list/linked_list"
|
||||
linkedlist "focus/list/linked_list"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
)
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"github.com/474420502/focus/tree/avlkeydup"
|
||||
"focus/compare"
|
||||
"focus/tree/avlkeydup"
|
||||
)
|
||||
|
||||
type TreeMap struct {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package pqueue
|
||||
|
||||
import (
|
||||
lastack "github.com/474420502/focus/stack/listarraystack"
|
||||
lastack "focus/stack/listarraystack"
|
||||
)
|
||||
|
||||
type Iterator struct {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package pqueue
|
||||
|
||||
import (
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
)
|
||||
|
||||
func TestQueuePush(t *testing.T) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package pqueue
|
|||
import (
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
)
|
||||
|
||||
type Node struct {
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"log"
|
||||
"testing"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package pqueuekey
|
||||
|
||||
import (
|
||||
lastack "github.com/474420502/focus/stack/listarraystack"
|
||||
lastack "focus/stack/listarraystack"
|
||||
)
|
||||
|
||||
type Iterator struct {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package pqueuekey
|
||||
|
||||
import (
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,7 +4,8 @@ import (
|
|||
"log"
|
||||
"testing"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
)
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"log"
|
||||
"testing"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
)
|
||||
|
|
|
@ -3,7 +3,7 @@ package pqueuekey
|
|||
import (
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
)
|
||||
|
||||
type Node struct {
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"github.com/474420502/focus/tree/avldup"
|
||||
"focus/compare"
|
||||
"focus/tree/avldup"
|
||||
)
|
||||
|
||||
// TreeSet
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"github.com/474420502/focus/tree/avldup"
|
||||
"focus/compare"
|
||||
"focus/tree/avldup"
|
||||
)
|
||||
|
||||
func TestTreeSet_Add(t *testing.T) {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package lastack
|
||||
|
||||
import (
|
||||
"github.com/474420502/focus/stack"
|
||||
"focus/stack"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package lastack
|
||||
|
||||
import (
|
||||
"github.com/474420502/focus/stack"
|
||||
"focus/stack"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
)
|
||||
|
||||
|
@ -19,7 +20,6 @@ func assertImplementation() {
|
|||
var _ stack.IStack = (*Stack)(nil)
|
||||
}
|
||||
|
||||
|
||||
func New() *Stack {
|
||||
s := &Stack{}
|
||||
s.size = 0
|
||||
|
|
|
@ -3,8 +3,8 @@ package avl
|
|||
import (
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"github.com/474420502/focus/tree"
|
||||
"focus/compare"
|
||||
"focus/tree"
|
||||
)
|
||||
|
||||
type Node struct {
|
||||
|
|
|
@ -7,7 +7,8 @@ import (
|
|||
"log"
|
||||
"testing"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package avl
|
||||
|
||||
import (
|
||||
lastack "github.com/474420502/focus/stack/listarraystack"
|
||||
lastack "focus/stack/listarraystack"
|
||||
)
|
||||
|
||||
type Iterator struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
)
|
||||
|
||||
func TestIerator(t *testing.T) {
|
||||
|
|
|
@ -3,8 +3,8 @@ package avldup
|
|||
import (
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"github.com/474420502/focus/tree"
|
||||
"focus/compare"
|
||||
"focus/tree"
|
||||
)
|
||||
|
||||
type Node struct {
|
||||
|
|
|
@ -7,7 +7,8 @@ import (
|
|||
"log"
|
||||
"testing"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package avldup
|
||||
|
||||
import (
|
||||
lastack "github.com/474420502/focus/stack/listarraystack"
|
||||
lastack "focus/stack/listarraystack"
|
||||
)
|
||||
|
||||
type Iterator struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
)
|
||||
|
||||
func TestIerator(t *testing.T) {
|
||||
|
|
|
@ -3,8 +3,8 @@ package avlkey
|
|||
import (
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"github.com/474420502/focus/tree"
|
||||
"focus/compare"
|
||||
"focus/tree"
|
||||
)
|
||||
|
||||
type Node struct {
|
||||
|
|
|
@ -7,7 +7,8 @@ import (
|
|||
"log"
|
||||
"testing"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package avlkey
|
||||
|
||||
import (
|
||||
lastack "github.com/474420502/focus/stack/listarraystack"
|
||||
lastack "focus/stack/listarraystack"
|
||||
)
|
||||
|
||||
type Iterator struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
)
|
||||
|
||||
func TestIerator(t *testing.T) {
|
||||
|
|
|
@ -3,8 +3,8 @@ package avlkeydup
|
|||
import (
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"github.com/474420502/focus/tree"
|
||||
"focus/compare"
|
||||
"focus/tree"
|
||||
)
|
||||
|
||||
type Node struct {
|
||||
|
|
|
@ -7,7 +7,8 @@ import (
|
|||
"log"
|
||||
"testing"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package avlkeydup
|
||||
|
||||
import (
|
||||
lastack "github.com/474420502/focus/stack/listarraystack"
|
||||
lastack "focus/stack/listarraystack"
|
||||
)
|
||||
|
||||
type Iterator struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
)
|
||||
|
||||
func TestIerator(t *testing.T) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package heap
|
||||
|
||||
import (
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
)
|
||||
|
||||
type Tree struct {
|
||||
|
|
|
@ -4,7 +4,8 @@ import (
|
|||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
|
||||
"github.com/Pallinder/go-randomdata"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package lsv
|
||||
|
||||
import (
|
||||
lastack "github.com/474420502/focus/stack/listarraystack"
|
||||
lastack "focus/stack/listarraystack"
|
||||
)
|
||||
|
||||
type Iterator struct {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package vbt
|
||||
|
||||
import (
|
||||
lastack "github.com/474420502/focus/stack/listarraystack"
|
||||
lastack "focus/stack/listarraystack"
|
||||
)
|
||||
|
||||
type Iterator struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
)
|
||||
|
||||
func TestIerator(t *testing.T) {
|
||||
|
|
|
@ -3,8 +3,8 @@ package vbt
|
|||
import (
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"github.com/474420502/focus/tree"
|
||||
"focus/compare"
|
||||
"focus/tree"
|
||||
)
|
||||
|
||||
type Node struct {
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"github.com/Pallinder/go-randomdata"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
)
|
||||
|
||||
func loadTestData() []int {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package vbtdup
|
||||
|
||||
import (
|
||||
lastack "github.com/474420502/focus/stack/listarraystack"
|
||||
lastack "focus/stack/listarraystack"
|
||||
)
|
||||
|
||||
type Iterator struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
)
|
||||
|
||||
func TestIerator(t *testing.T) {
|
||||
|
|
|
@ -3,8 +3,8 @@ package vbtdup
|
|||
import (
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"github.com/474420502/focus/tree"
|
||||
"focus/compare"
|
||||
"focus/tree"
|
||||
)
|
||||
|
||||
type Node struct {
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"github.com/Pallinder/go-randomdata"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
)
|
||||
|
||||
func loadTestData() []int {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package vbtkey
|
||||
|
||||
import (
|
||||
lastack "github.com/474420502/focus/stack/listarraystack"
|
||||
lastack "focus/stack/listarraystack"
|
||||
)
|
||||
|
||||
type Iterator struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
)
|
||||
|
||||
func TestIerator(t *testing.T) {
|
||||
|
|
|
@ -3,8 +3,8 @@ package vbtkey
|
|||
import (
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"github.com/474420502/focus/tree"
|
||||
"focus/compare"
|
||||
"focus/tree"
|
||||
)
|
||||
|
||||
type Node struct {
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"github.com/Pallinder/go-randomdata"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
)
|
||||
|
||||
func loadTestData() []int {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package vbtkeydup
|
||||
|
||||
import (
|
||||
lastack "github.com/474420502/focus/stack/listarraystack"
|
||||
lastack "focus/stack/listarraystack"
|
||||
)
|
||||
|
||||
type Iterator struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
)
|
||||
|
||||
func TestIerator(t *testing.T) {
|
||||
|
|
|
@ -3,8 +3,8 @@ package vbtkeydup
|
|||
import (
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"github.com/474420502/focus/tree"
|
||||
"focus/compare"
|
||||
"focus/tree"
|
||||
)
|
||||
|
||||
type Node struct {
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"github.com/Pallinder/go-randomdata"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
|
||||
"github.com/474420502/focus/compare"
|
||||
"focus/compare"
|
||||
)
|
||||
|
||||
func loadTestData() []int {
|
||||
|
|
Loading…
Reference in New Issue
Block a user