Giter Site home page Giter Site logo

gotree's Issues

Your recent refactor changed names that breaks Gorganizer

Had to revert to the version 20 days ago.

./gorganizer.go:24: undefined: gotree.GTStructure
./gorganizer.go:26: undefined: gotree.GTStructure
./gorganizer.go:38: undefined: gotree.GTStructure
./gorganizer.go:109: undefined: gotree.GTStructure
./gorganizer.go:114: undefined: gotree.PrintTree
./gorganizer.go:119: undefined: gotree.GTStructure
./ini.go:54: undefined: gotree.GTStructure
./ini.go:60: undefined: gotree.GTStructure
./ini.go:68: undefined: gotree.GTStructure
./ini.go:78: undefined: gotree.PrintTree

`go get` downloads the v1 (old and broken version) instead of latest (v3)

Hi,

found this repo today, tried doing the go get line to add it to my project, discovered it downloads either some .a file or the pkg code for the v1 release. Not sure what is wrong with the repo, guessing a bad release setup in github or go.mod file?

Would much prefer to import your repo instead of forking the latest version to resolve this.

Thanks

Bump version

When using dep (and maybe others) to install this library, it pickup the latest tagged version 0.1. I would like to use master without having to add a constraint in the Gopkg.toml.
Could you tag the latest master to a new semver version, 0.2.0 or something like that?
Thanks!

Multiline nodes

May I create a feature for more beautiful view for node strings with "\n"(newlines).
Could you clarify.

Prototype:

	artist := gotree.New("Pantera")
	album := artist.Add("Far Beyond\nDriven") // <<----- add newline here
	album.Add("5 minutes Alone")
	artist.Add("Power Metal")
	fmt.Println(artist.Print())

	// Output:
	// Pantera
	// ├───+ Far Beyond 
	// │   │ Driven                         // <<<<----- good view on new line
	// │   └── 5 minutes Alone
	// └── Power Metal

Test is not executed

The test file contains a test, but it is only a visual inspection test.

A small refactor can allow to test dynamically, and I have a patch ready if you are interested.

file system tree

wondering if it would makes sense to extend this to allow printing a file system tree ?

The reason being that i am toying with the idea to extend this lib a bit to show git status and maybe a few other things.

The idea is that you can just install it on any machine and have a decent folder view tool, along with the micro terminal IDE ( https://github.com/zyedidia/micro )

Wondering what you think..

Use pointers in GTStructure to allow mutation of the items before printing

Hi,

I have just created a PR #5 which changes items in GTStructure from value receiver to a pointer. This is an API breaking change so not sure if you are open for it.

This change basically has two benefits:

  • pointer reference should be more efficient for the bigger data structures
  • it allows for construction of the data structure and modification of the items before actual printing is done. This is useful in cases when construction of the structure and its final state happens in different stages of the program. Thanks to pointers data can be modified without actual need of value copying entire structure.

WDYT about it? All remarks are welcomed.

I am happy to update README.md as well with the usage example if you think that this PR brings any value.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.