diff --git a/README.md b/README.md index 964cd09..3f31dc8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Tree +# go-tree [![GoDoc](https://godoc.org/github.com/johnfercher/tree?status.svg)](https://godoc.org/github.com/johnfercher/tree) [![Go Report Card](https://goreportcard.com/badge/github.com/johnfercher/tree)](https://goreportcard.com/report/github.com/johnfercher/tree) @@ -13,20 +13,20 @@ A generic unbalanced tree implementation, where you can define which node will b * With `go get`: ```bash -go get -u github.com/johnfercher/tree +go get -u github.com/johnfercher/go-tree ``` ## Contributing -| Command | Description | Dependencies | -|-----------------|---------------------------------------------------|---------------------------------------------------------------| -| `make build` | Build project | `go` | -| `make test` | Run unit tests | `go` | -| `make fmt` | Format files | `gofmt`, `gofumpt` and `goimports` | -| `make lint` | Check files | `golangci-lint` and `goreportcard-cli` | +| Command | Description | Dependencies | +|-----------------|--------------------------------------------------|---------------------------------------------------------------| +| `make build` | Build project | `go` | +| `make test` | Run unit tests | `go` | +| `make fmt` | Format files | `gofmt`, `gofumpt` and `goimports` | +| `make lint` | Check files | `golangci-lint` and `goreportcard-cli` | | `make dod` | (Definition of Done) Format files and check files | Same as `make build`, `make test`, `make fmt` and `make lint` | -| `make install` | Install all dependencies | `go`, `curl` and `git` | -| `make examples` | Run all examples | `go` | +| `make install` | Install all dependencies | `go`, `curl` and `git` | +| `make examples` | Run all examples | `go` | ## Features ### Node diff --git a/cmd/main.go b/cmd/main.go index 3b63057..193e51b 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "github.com/johnfercher/tree/pkg/tree" + "github.com/johnfercher/go-tree/tree" ) // nolint:gomnd,gocritic diff --git a/go.mod b/go.mod index f74db4b..ec3fb8a 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,11 @@ -module github.com/johnfercher/tree +module github.com/johnfercher/go-tree -go 1.21.0 +go 1.21.1 + +require github.com/stretchr/testify v1.8.4 require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/testify v1.8.4 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 8cf6655..fa4b6e6 100644 --- a/go.sum +++ b/go.sum @@ -4,6 +4,7 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/pkg/tree/example_test.go b/tree/example_test.go similarity index 98% rename from pkg/tree/example_test.go rename to tree/example_test.go index 81aa027..cfd1655 100644 --- a/pkg/tree/example_test.go +++ b/tree/example_test.go @@ -3,7 +3,7 @@ package tree_test import ( "fmt" - "github.com/johnfercher/tree/pkg/tree" + "github.com/johnfercher/go-tree/tree" ) // ExampleNew demonstrates how to create tree. diff --git a/pkg/tree/node.go b/tree/node.go similarity index 100% rename from pkg/tree/node.go rename to tree/node.go diff --git a/pkg/tree/node_test.go b/tree/node_test.go similarity index 99% rename from pkg/tree/node_test.go rename to tree/node_test.go index 3d35cf3..1100528 100644 --- a/pkg/tree/node_test.go +++ b/tree/node_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/johnfercher/tree/pkg/tree" + "github.com/johnfercher/go-tree/tree" "github.com/stretchr/testify/assert" ) diff --git a/pkg/tree/tree.go b/tree/tree.go similarity index 100% rename from pkg/tree/tree.go rename to tree/tree.go diff --git a/pkg/tree/tree_test.go b/tree/tree_test.go similarity index 99% rename from pkg/tree/tree_test.go rename to tree/tree_test.go index b086fe7..4262f3a 100644 --- a/pkg/tree/tree_test.go +++ b/tree/tree_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/johnfercher/tree/pkg/tree" + "github.com/johnfercher/go-tree/tree" "github.com/stretchr/testify/assert" )