更换package结构

This commit is contained in:
eson 2020-03-21 08:43:29 +08:00
parent 1eb9512a5f
commit f64c65069b
57 changed files with 85 additions and 70 deletions

5
go.mod
View File

@ -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
View File

@ -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=

View File

@ -3,7 +3,8 @@ package arraylist
import (
"log"
"github.com/474420502/focus/list"
"focus/list"
"github.com/davecgh/go-spew/spew"
)

View File

@ -3,7 +3,8 @@ package linkedlist
import (
"fmt"
"github.com/474420502/focus/list"
"focus/list"
"github.com/davecgh/go-spew/spew"
)

View File

@ -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"
)

View File

@ -7,7 +7,8 @@ import (
"log"
"testing"
"github.com/474420502/focus/compare"
"focus/compare"
"github.com/davecgh/go-spew/spew"
)

View File

@ -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"
)

View File

@ -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 {

View File

@ -1,7 +1,7 @@
package pqueue
import (
lastack "github.com/474420502/focus/stack/listarraystack"
lastack "focus/stack/listarraystack"
)
type Iterator struct {

View File

@ -1,7 +1,7 @@
package pqueue
import (
"github.com/474420502/focus/compare"
"focus/compare"
"github.com/davecgh/go-spew/spew"
)

View File

@ -5,7 +5,7 @@ import (
"github.com/davecgh/go-spew/spew"
"github.com/474420502/focus/compare"
"focus/compare"
)
func TestQueuePush(t *testing.T) {

View File

@ -3,7 +3,7 @@ package pqueue
import (
"github.com/davecgh/go-spew/spew"
"github.com/474420502/focus/compare"
"focus/compare"
)
type Node struct {

View File

@ -7,7 +7,7 @@ import (
"log"
"testing"
"github.com/474420502/focus/compare"
"focus/compare"
"github.com/davecgh/go-spew/spew"
)

View File

@ -1,7 +1,7 @@
package pqueuekey
import (
lastack "github.com/474420502/focus/stack/listarraystack"
lastack "focus/stack/listarraystack"
)
type Iterator struct {

View File

@ -1,7 +1,8 @@
package pqueuekey
import (
"github.com/474420502/focus/compare"
"focus/compare"
"github.com/davecgh/go-spew/spew"
)

View File

@ -4,7 +4,8 @@ import (
"log"
"testing"
"github.com/474420502/focus/compare"
"focus/compare"
"github.com/davecgh/go-spew/spew"
)

View File

@ -7,7 +7,7 @@ import (
"log"
"testing"
"github.com/474420502/focus/compare"
"focus/compare"
"github.com/davecgh/go-spew/spew"
)

View File

@ -3,7 +3,7 @@ package pqueuekey
import (
"github.com/davecgh/go-spew/spew"
"github.com/474420502/focus/compare"
"focus/compare"
)
type Node struct {

View File

@ -4,8 +4,8 @@ import (
"fmt"
"strings"
"github.com/474420502/focus/compare"
"github.com/474420502/focus/tree/avldup"
"focus/compare"
"focus/tree/avldup"
)
// TreeSet

View File

@ -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) {

View File

@ -1,7 +1,8 @@
package lastack
import (
"github.com/474420502/focus/stack"
"focus/stack"
"github.com/davecgh/go-spew/spew"
)

View File

@ -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

View File

@ -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 {

View File

@ -7,7 +7,8 @@ import (
"log"
"testing"
"github.com/474420502/focus/compare"
"focus/compare"
"github.com/davecgh/go-spew/spew"
)

View File

@ -1,7 +1,7 @@
package avl
import (
lastack "github.com/474420502/focus/stack/listarraystack"
lastack "focus/stack/listarraystack"
)
type Iterator struct {

View File

@ -4,7 +4,7 @@ import (
"sort"
"testing"
"github.com/474420502/focus/compare"
"focus/compare"
)
func TestIerator(t *testing.T) {

View File

@ -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 {

View File

@ -7,7 +7,8 @@ import (
"log"
"testing"
"github.com/474420502/focus/compare"
"focus/compare"
"github.com/davecgh/go-spew/spew"
)

View File

@ -1,7 +1,7 @@
package avldup
import (
lastack "github.com/474420502/focus/stack/listarraystack"
lastack "focus/stack/listarraystack"
)
type Iterator struct {

View File

@ -4,7 +4,7 @@ import (
"sort"
"testing"
"github.com/474420502/focus/compare"
"focus/compare"
)
func TestIerator(t *testing.T) {

View File

@ -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 {

View File

@ -7,7 +7,8 @@ import (
"log"
"testing"
"github.com/474420502/focus/compare"
"focus/compare"
"github.com/davecgh/go-spew/spew"
)

View File

@ -1,7 +1,7 @@
package avlkey
import (
lastack "github.com/474420502/focus/stack/listarraystack"
lastack "focus/stack/listarraystack"
)
type Iterator struct {

View File

@ -4,7 +4,7 @@ import (
"sort"
"testing"
"github.com/474420502/focus/compare"
"focus/compare"
)
func TestIerator(t *testing.T) {

View File

@ -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 {

View File

@ -7,7 +7,8 @@ import (
"log"
"testing"
"github.com/474420502/focus/compare"
"focus/compare"
"github.com/davecgh/go-spew/spew"
)

View File

@ -1,7 +1,7 @@
package avlkeydup
import (
lastack "github.com/474420502/focus/stack/listarraystack"
lastack "focus/stack/listarraystack"
)
type Iterator struct {

View File

@ -4,7 +4,7 @@ import (
"sort"
"testing"
"github.com/474420502/focus/compare"
"focus/compare"
)
func TestIerator(t *testing.T) {

View File

@ -1,7 +1,7 @@
package heap
import (
"github.com/474420502/focus/compare"
"focus/compare"
)
type Tree struct {

View File

@ -4,7 +4,8 @@ import (
"sort"
"testing"
"github.com/474420502/focus/compare"
"focus/compare"
"github.com/Pallinder/go-randomdata"
)

View File

@ -1,7 +1,7 @@
package lsv
import (
lastack "github.com/474420502/focus/stack/listarraystack"
lastack "focus/stack/listarraystack"
)
type Iterator struct {

View File

@ -1,7 +1,7 @@
package vbt
import (
lastack "github.com/474420502/focus/stack/listarraystack"
lastack "focus/stack/listarraystack"
)
type Iterator struct {

View File

@ -4,7 +4,7 @@ import (
"sort"
"testing"
"github.com/474420502/focus/compare"
"focus/compare"
)
func TestIerator(t *testing.T) {

View File

@ -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 {

View File

@ -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 {

View File

@ -1,7 +1,7 @@
package vbtdup
import (
lastack "github.com/474420502/focus/stack/listarraystack"
lastack "focus/stack/listarraystack"
)
type Iterator struct {

View File

@ -4,7 +4,7 @@ import (
"sort"
"testing"
"github.com/474420502/focus/compare"
"focus/compare"
)
func TestIerator(t *testing.T) {

View File

@ -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 {

View File

@ -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 {

View File

@ -1,7 +1,7 @@
package vbtkey
import (
lastack "github.com/474420502/focus/stack/listarraystack"
lastack "focus/stack/listarraystack"
)
type Iterator struct {

View File

@ -4,7 +4,7 @@ import (
"sort"
"testing"
"github.com/474420502/focus/compare"
"focus/compare"
)
func TestIerator(t *testing.T) {

View File

@ -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 {

View File

@ -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 {

View File

@ -1,7 +1,7 @@
package vbtkeydup
import (
lastack "github.com/474420502/focus/stack/listarraystack"
lastack "focus/stack/listarraystack"
)
type Iterator struct {

View File

@ -4,7 +4,7 @@ import (
"sort"
"testing"
"github.com/474420502/focus/compare"
"focus/compare"
)
func TestIerator(t *testing.T) {

View File

@ -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 {

View File

@ -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 {