{"id":13410218,"url":"https://github.com/gosuri/uitable","last_synced_at":"2025-05-14T11:10:28.947Z","repository":{"id":40910412,"uuid":"46149597","full_name":"gosuri/uitable","owner":"gosuri","description":"A go library to improve readability in terminal apps using tabular data","archived":false,"fork":false,"pushed_at":"2022-10-18T07:02:33.000Z","size":28,"stargazers_count":743,"open_issues_count":8,"forks_count":31,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-05-12T11:01:09.498Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/gosuri.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":"2015-11-13T21:59:21.000Z","updated_at":"2025-05-07T14:59:02.000Z","dependencies_parsed_at":"2022-09-20T14:50:41.612Z","dependency_job_id":null,"html_url":"https://github.com/gosuri/uitable","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gosuri%2Fuitable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gosuri%2Fuitable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gosuri%2Fuitable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gosuri%2Fuitable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gosuri","download_url":"https://codeload.github.com/gosuri/uitable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254129490,"owners_count":22019628,"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-07-30T20:01:05.592Z","updated_at":"2025-05-14T11:10:23.927Z","avatar_url":"https://github.com/gosuri.png","language":"Go","readme":"# uitable [![GoDoc](https://godoc.org/github.com/gosuri/uitable?status.svg)](https://godoc.org/github.com/gosuri/uitable) [![Build Status](https://travis-ci.org/gosuri/uitable.svg?branch=master)](https://travis-ci.org/gosuri/uitable)\n\nuitable is a go library for representing data as tables for terminal applications. It provides primitives for sizing and wrapping columns to improve readability.\n\n## Example Usage\n\nFull source code for the example is available at [example/main.go](example/main.go)\n\n```go\ntable := uitable.New()\ntable.MaxColWidth = 50\n\ntable.AddRow(\"NAME\", \"BIRTHDAY\", \"BIO\")\nfor _, hacker := range hackers {\n  table.AddRow(hacker.Name, hacker.Birthday, hacker.Bio)\n}\nfmt.Println(table)\n```\n\nWill render the data as:\n\n```sh\nNAME          BIRTHDAY          BIO\nAda Lovelace  December 10, 1815 Ada was a British mathematician and writer, chi...\nAlan Turing   June 23, 1912     Alan was a British pioneering computer scientis...\n```\n\nFor wrapping in two columns:\n\n```go\ntable = uitable.New()\ntable.MaxColWidth = 80\ntable.Wrap = true // wrap columns\n\nfor _, hacker := range hackers {\n  table.AddRow(\"Name:\", hacker.Name)\n  table.AddRow(\"Birthday:\", hacker.Birthday)\n  table.AddRow(\"Bio:\", hacker.Bio)\n  table.AddRow(\"\") // blank\n}\nfmt.Println(table)\n```\n\nWill render the data as:\n\n```\nName:     Ada Lovelace\nBirthday: December 10, 1815\nBio:      Ada was a British mathematician and writer, chiefly known for her work on\n          Charles Babbage's early mechanical general-purpose computer, the Analytical\n          Engine\n\nName:     Alan Turing\nBirthday: June 23, 1912\nBio:      Alan was a British pioneering computer scientist, mathematician, logician,\n          cryptanalyst and theoretical biologist\n```\n\n## Installation\n\n```\n$ go get -v github.com/gosuri/uitable\n```\n\n","funding_links":[],"categories":["Go","Command Line","高级控制台UI`用于构建控制台应用程序和控制台用户界面的库.`","命令行","Build Automation","\u003cspan id=\"命令行-command-line\"\u003e命令行 Command Line\u003c/span\u003e","高级控制台UI"],"sub_categories":["Advanced Console UIs","高级控制台用户界面","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","标准 CLI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgosuri%2Fuitable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgosuri%2Fuitable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgosuri%2Fuitable/lists"}