tree

package module
v0.0.0-...-460e69c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2021 License: MIT Imports: 4 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Tree

Build Status

Create an text-based tree (like $ tree) from any text using a custom delimiter.

CLI

https://github.com/homburg/tree/

USAGE

package main

import (
	"fmt"
	"github.com/homburg/tree"
)

func main() {

	t := tree.New("-")

	t.EatLines([]string{
		"root"
		"root-first",
		"root-first-second.txt",
		"third",
	})

	fmt.Println(t.Format())
	// Output:
	// root
	// └─── first
	//      └── second.txt
	// third.txt
}

LICENSE(S)

MIT 2016 Thomas B Homburg

LICENSE.md LICENSES.md

Documentation

Index

Constants

View Source
const (
	TEE   = "├── "
	PIPE  = "│   "
	BEND  = "└── "
	WIDTH = len(PIPE)
)

Variables

This section is empty.

Functions

func New

func New(separator string) *tree

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址