{"id":22691489,"url":"https://github.com/noahingh/tree","last_synced_at":"2025-03-29T16:42:01.734Z","repository":{"id":57504187,"uuid":"230127504","full_name":"noahingh/tree","owner":"noahingh","description":"Display content recursively as tree-like format.","archived":false,"fork":false,"pushed_at":"2020-01-01T03:25:26.000Z","size":40,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-27T08:34:02.639Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/noahingh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-25T16:28:59.000Z","updated_at":"2020-01-14T03:04:23.000Z","dependencies_parsed_at":"2022-08-29T20:21:14.182Z","dependency_job_id":null,"html_url":"https://github.com/noahingh/tree","commit_stats":null,"previous_names":["hanjunlee/tree"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noahingh%2Ftree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noahingh%2Ftree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noahingh%2Ftree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noahingh%2Ftree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noahingh","download_url":"https://codeload.github.com/noahingh/tree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246215820,"owners_count":20741894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-10T01:11:24.081Z","updated_at":"2025-03-29T16:42:01.712Z","avatar_url":"https://github.com/noahingh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tree\n\n[![Build Status](https://cloud.drone.io/api/badges/hanjunlee/tree/status.svg)](https://cloud.drone.io/hanjunlee/tree) [![GoDoc](https://godoc.org/github.com/hanjunlee/tree?status.svg)](https://godoc.org/github.com/hanjunlee/tree)\n\nPackage tree help to display content recursively as tree-like format. \n\n## Usage\n\n**code**\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/hanjunlee/tree\"\n)\n\ntype file string\n\nfunc (f file) String() string {\n    return string(f)\n}\n\nfunc (f file) Less(comp tree.Item) bool {\n    return string(f) \u003c string(comp.(file))\n}\n\nfunc main() {\n    t := tree.NewTree(file(\"root\"))\n\n    t.Move(file(\"dir0\"), file(\"root\"))\n    t.Move(file(\"dir1\"), file(\"root\"))\n\n    t.Move(file(\"file 0\"), file(\"dir0\"))\n    t.Move(file(\"file 1\"), file(\"dir0\"))\n\n    t.Move(file(\"file 2\"), file(\"dir1\"))\n\n    result, _ := t.Render()\n    for _, l := range result {\n        fmt.Println(l)\n    }\n}\n```\n\n**output**\n\n```output\nroot\n├── dir 0\n│   ├── file 0\n│   └── file 1\n└── dir 1\n    └── file 2\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoahingh%2Ftree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoahingh%2Ftree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoahingh%2Ftree/lists"}