Skip to content

Releases: ddddddO/gtree

v1.13.5

14 Feb 00:24
516e28a

Choose a tag to compare

What's Changed

Full Changelog: v1.13.4...v1.13.5

v1.13.4

13 Feb 23:15
e712e92

Choose a tag to compare

What's Changed

Full Changelog: v1.13.3...v1.13.4

v1.13.3

31 Jan 22:13
695779a

Choose a tag to compare

What's Changed

Full Changelog: v1.13.2...v1.13.3

v1.13.2

28 Dec 08:48
404d58e

Choose a tag to compare

What's Changed

  • Bump github.com/urfave/cli/v3 from 3.6.0 to 3.6.1 by @dependabot[bot] in #334
  • Bump github.com/goccy/go-yaml from 1.18.0 to 1.19.0 by @dependabot[bot] in #335
  • Bump golang.org/x/sync from 0.18.0 to 0.19.0 by @dependabot[bot] in #336
  • Bump github.com/goccy/go-yaml from 1.19.0 to 1.19.1 by @dependabot[bot] in #337

Full Changelog: v1.13.1...v1.13.2

v1.13.1

18 Nov 15:40
d438b91

Choose a tag to compare

What's Changed

Full Changelog: v1.13.0...v1.13.1

v1.13.0

03 Nov 10:40
5037632

Choose a tag to compare

What's Changed

I've updated the option functions to allow you to change the tree branches!

Added Options

  • WithMidBranch
  • WithLastBranch
  • WithVLine
  • WithHLine

Removed Options

The following functions were not used in GitHub repositories and have been removed:

  • WithBranchFormatIntermedialNode
  • WithBranchFormatLastNode

Full Changelog: v1.12.0...v1.13.0

v1.12.0

31 Oct 12:12
d40fa37

Choose a tag to compare

What's Changed

  • Bump github.com/urfave/cli/v3 from 3.4.1 to 3.5.0 by @dependabot[bot] in #325
  • Add option of allowing_duplicate_nodes by @ddddddO in #327

Tip

Specifying WithDuplicationAllowed function in NewRoot function,
which generates the Node arguments for the above functions,
allows multiple nodes with the same name to exist within the same hierarchy.

Standard Pattern and Pattern Allowing Node Duplication

package main

import (
	"os"

	"github.com/ddddddO/gtree"
)

func main() {
	rootOfStandard := gtree.NewRoot("Standard Pattern")
	addChildren(rootOfStandard)
	_ = gtree.OutputFromRoot(os.Stdout, rootOfStandard)
	// Standard Pattern
	// ├── child 1
	// │   └── child 2
	// │       ├── child 3
	// │       └── child 4
	// │           ├── child 5
	// │           └── child 6
	// │               ├── child 7
	// │               └── child 9
	// └── child 8

	rootOfAllowedDuplication := gtree.NewRoot("Pattern Allowing Node Duplication", gtree.WithDuplicationAllowed())
	addChildren(rootOfAllowedDuplication)
	_ = gtree.OutputFromRoot(os.Stdout, rootOfAllowedDuplication)
	// Pattern Allowing Node Duplication
	// ├── child 1
	// │   └── child 2
	// │       └── child 3
	// ├── child 1
	// │   └── child 2
	// │       └── child 4
	// │           ├── child 5
	// │           ├── child 6
	// │           │   └── child 7
	// │           ├── child 6
	// │           │   └── child 9
	// │           └── child 5
	// └── child 8
}

func addChildren(root *gtree.Node) {
	root.Add("child 1").Add("child 2").Add("child 3")
	var child4 *gtree.Node = root.Add("child 1").Add("child 2").Add("child 4")
	child4.Add("child 5")
	child4.Add("child 6").Add("child 7")
	child4.Add("child 6").Add("child 9")
	child4.Add("child 5")
	root.Add("child 8")
}

-> ref1(NewRoot)
-> ref2(OutputFromRoot)
-> ref3(WalkFromRoot)
-> ref4(WalkIterFromRoot)

Full Changelog: v1.11.9...v1.12.0

v1.11.9

12 Oct 03:12
e54e8ae

Choose a tag to compare

What's Changed

Full Changelog: v1.11.8...v1.11.9

v1.11.8

04 Aug 09:16
3c587f0

Choose a tag to compare

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

17 May 03:15
e27a480

Choose a tag to compare

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