Documentation ¶
Overview ¶
Package gooki はディレクトリの内容をツリー構造で扱うためのモジュールです
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Make ¶
Make はディレクトリツリー情報を生成します。
Example ¶
package main import ( "os" "github.com/masakurapa/gooki" ) func main() { ki, err := gooki.Make("./testdata", gooki.DefaultOption()) if err != nil { panic(err) } ki.Write(os.Stdout) }
Output: ./testdata ├── example.txt ├── path1 │ ├── to.txt │ ├── to1 │ │ ├── file1.go │ │ └── file2.go │ └── to2 │ └── sample.txt ├── path2 │ ├── example1.go │ └── example1_test.go └── symlink.txt -> example.txt 4 directories, 8 files
func MakeByDefaultOption ¶ added in v0.2.0
MakeByDefaultOption はデフォルトのオプションでディレクトリツリー情報を生成します。
Example ¶
package main import ( "os" "github.com/masakurapa/gooki" ) func main() { ki, err := gooki.MakeByDefaultOption("./testdata") if err != nil { panic(err) } ki.Write(os.Stdout) }
Output: ./testdata ├── example.txt ├── path1 │ ├── to.txt │ ├── to1 │ │ ├── file1.go │ │ └── file2.go │ └── to2 │ └── sample.txt ├── path2 │ ├── example1.go │ └── example1_test.go └── symlink.txt -> example.txt 4 directories, 8 files
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.