Releases: ddddddO/gtree
Releases · ddddddO/gtree
v1.11.8
What's Changed
- Bump github.com/goccy/go-yaml from 1.17.1 to 1.18.0 by @dependabot[bot] in #317
- Bump golang.org/x/sync from 0.14.0 to 0.15.0 by @dependabot[bot] in #318
- Bump github.com/urfave/cli/v3 from 3.3.3 to 3.3.8 by @dependabot[bot] in #319
- Bump golang.org/x/sync from 0.15.0 to 0.16.0 by @dependabot[bot] in #320
Full Changelog: v1.11.7...v1.11.8
v1.11.7
What's Changed
- Bump golang.org/x/sync from 0.13.0 to 0.14.0 by @dependabot in #315
- Bump github.com/urfave/cli/v3 from 3.3.2 to 3.3.3 by @dependabot in #316
- Add doc for custom writer
Full Changelog: v1.11.6...v1.11.7
v1.11.6
What's Changed
- Use goccy/go-yaml and update credits by @ddddddO in #312
- Bump github.com/urfave/cli/v3 from 3.2.0 to 3.3.2 by @dependabot in #313
Full Changelog: v1.11.5...v1.11.6
v1.11.5
v1.11.4
v1.11.3
What's Changed
- Bump golang.org/x/sync from 0.12.0 to 0.13.0 by @dependabot in #307
- Bump github.com/pelletier/go-toml/v2 from 2.2.3 to 2.2.4 by @dependabot in #308
Full Changelog: v1.11.2...v1.11.3
v1.11.2
v1.11.1 change log
⚠ Marked some functions as deprecated in order to rename public functions. ⚠
- see: https://pkg.go.dev/github.com/ddddddO/gtree
- rename and examples by @ddddddO in #305
Full Changelog: v1.11.0...v1.11.1
v1.11.2 change log
- Fix doc
Full Changelog: v1.11.1...v1.11.2
v1.11.1
What's Changed
⚠ Marked some functions as deprecated in order to rename public functions. ⚠
- see: https://pkg.go.dev/github.com/ddddddO/gtree
- rename and examples by @ddddddO in #305
Full Changelog: v1.11.0...v1.11.1
v1.11.0
What's Changed
- WalkIterProgrammably func implemented by @ddddddO in #303
- Iterator implementation
- It returns each node resulting from a recursive traversal of the tree structure, so you can process on each node
- 👇The following is sample code👇
package main
import (
"fmt"
"os"
"github.com/ddddddO/gtree"
)
func main() {
root := gtree.NewRoot("root")
root.Add("child 1").Add("child 2").Add("child 3")
root.Add("child 5")
root.Add("child 1").Add("child 2").Add("child 4")
for wn, err := range gtree.WalkIterProgrammably(root) {
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
fmt.Println(wn.Row())
}
// Output:
// root
// ├── child 1
// │ └── child 2
// │ ├── child 3
// │ └── child 4
// └── child 5
for wn, err := range gtree.WalkIterProgrammably(root) {
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
fmt.Println("WalkerNode's methods called...")
fmt.Printf("\tName : %s\n", wn.Name())
fmt.Printf("\tBranch : %s\n", wn.Branch())
fmt.Printf("\tRow : %s\n", wn.Row())
fmt.Printf("\tLevel : %d\n", wn.Level())
fmt.Printf("\tPath : %s\n", wn.Path())
fmt.Printf("\tHasChild : %t\n", wn.HasChild())
}
// Output:
// WalkerNode's methods called...
// Name : root
// Branch :
// Row : root
// Level : 1
// Path : root
// HasChild : true
// WalkerNode's methods called...
// Name : child 1
// Branch : ├──
// Row : ├── child 1
// Level : 2
// Path : root/child 1
// HasChild : true
// WalkerNode's methods called...
// Name : child 2
// Branch : │ └──
// Row : │ └── child 2
// Level : 3
// Path : root/child 1/child 2
// HasChild : true
// WalkerNode's methods called...
// Name : child 3
// Branch : │ ├──
// Row : │ ├── child 3
// Level : 4
// Path : root/child 1/child 2/child 3
// HasChild : false
// WalkerNode's methods called...
// Name : child 4
// Branch : │ └──
// Row : │ └── child 4
// Level : 4
// Path : root/child 1/child 2/child 4
// HasChild : false
// WalkerNode's methods called...
// Name : child 5
// Branch : └──
// Row : └── child 5
// Level : 2
// Path : root/child 5
// HasChild : false
}
Full Changelog: v1.10.15...v1.11.0
v1.10.15
What's Changed
- Bump github.com/urfave/cli/v2 from 2.27.5 to 2.27.6 by @dependabot in #301
- Bump golang.org/x/sync from 0.11.0 to 0.12.0 by @dependabot in #302
Full Changelog: v1.10.14...v1.10.15