{"id":13410077,"url":"https://github.com/alexeyco/simpletable","last_synced_at":"2026-02-11T17:15:49.528Z","repository":{"id":45340105,"uuid":"86551474","full_name":"alexeyco/simpletable","owner":"alexeyco","description":"Simple tables in terminal with Go","archived":false,"fork":false,"pushed_at":"2021-04-23T14:55:10.000Z","size":94,"stargazers_count":520,"open_issues_count":5,"forks_count":33,"subscribers_count":4,"default_branch":"v1","last_synced_at":"2024-07-30T20:35:28.670Z","etag":null,"topics":["ascii","cli","go","golang","table","terminal"],"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/alexeyco.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":"2017-03-29T07:27:23.000Z","updated_at":"2024-07-12T02:01:18.000Z","dependencies_parsed_at":"2022-09-26T17:41:33.912Z","dependency_job_id":null,"html_url":"https://github.com/alexeyco/simpletable","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/alexeyco/simpletable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeyco%2Fsimpletable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeyco%2Fsimpletable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeyco%2Fsimpletable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeyco%2Fsimpletable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexeyco","download_url":"https://codeload.github.com/alexeyco/simpletable/tar.gz/refs/heads/v1","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeyco%2Fsimpletable/sbom","scorecard":{"id":181328,"data":{"date":"2025-08-11","repo":{"name":"github.com/alexeyco/simpletable","commit":"74ab2ba3af1419e533ede3bd04c6b793f6e3acb9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":1,"reason":"Found 4/26 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'v1'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T18:55:18.377Z","repository_id":45340105,"created_at":"2025-08-16T18:55:18.377Z","updated_at":"2025-08-16T18:55:18.377Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29339003,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T16:14:43.024Z","status":"ssl_error","status_checked_at":"2026-02-11T16:14:15.258Z","response_time":97,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ascii","cli","go","golang","table","terminal"],"created_at":"2024-07-30T20:01:04.842Z","updated_at":"2026-02-11T17:15:49.509Z","avatar_url":"https://github.com/alexeyco.png","language":"Go","readme":"# Simple tables in terminal with Go\n\n[![Travis](https://img.shields.io/travis/alexeyco/simpletable.svg)](https://travis-ci.org/alexeyco/simpletable)\u0026nbsp;[![Coverage Status](https://coveralls.io/repos/github/alexeyco/simpletable/badge.svg?branch=master)](https://coveralls.io/github/alexeyco/simpletable?branch=master)\u0026nbsp;[![Go Report Card](https://goreportcard.com/badge/github.com/alexeyco/simpletable)](https://goreportcard.com/report/github.com/alexeyco/simpletable)\u0026nbsp;[![GoDoc](https://godoc.org/github.com/alexeyco/simpletable?status.svg)](https://godoc.org/github.com/alexeyco/simpletable)\n\nThis package allows to generate and display ascii tables in the terminal, f.e.:\n\n```\n+----+------------------+--------------+-----------------------------+------+\n| #  |       NAME       |    PHONE     |            EMAIL            | QTTY |\n+----+------------------+--------------+-----------------------------+------+\n|  1 | Newton G. Goetz  | 252-585-5166 | NewtonGGoetz@dayrep.com     |   10 |\n|  2 | Rebecca R. Edney | 865-475-4171 | RebeccaREdney@armyspy.com   |   12 |\n|  3 | John R. Jackson  | 810-325-1417 | JohnRJackson@armyspy.com    |   15 |\n|  4 | Ron J. Gomes     | 217-450-8568 | RonJGomes@rhyta.com         |   25 |\n|  5 | Penny R. Lewis   | 870-794-1666 | PennyRLewis@rhyta.com       |    5 |\n|  6 | Sofia J. Smith   | 770-333-7379 | SofiaJSmith@armyspy.com     |    3 |\n|  7 | Karlene D. Owen  | 231-242-4157 | KarleneDOwen@jourrapide.com |   12 |\n|  8 | Daniel L. Love   | 978-210-4178 | DanielLLove@rhyta.com       |   44 |\n|  9 | Julie T. Dial    | 719-966-5354 | JulieTDial@jourrapide.com   |    8 |\n| 10 | Juan J. Kennedy  | 908-910-8893 | JuanJKennedy@dayrep.com     |   16 |\n+----+------------------+--------------+-----------------------------+------+\n|                                                           Subtotal |  150 |\n+----+------------------+--------------+-----------------------------+------+\n```\n\nThere are the following key features:\n* **Declarative style.** _Have to write more code, and hell with it._\n* **Styling.** _With 7 predefined styles: MySql-like (default), compact, compact lite, compact classic, markdown, \n  rounded and unicode. And you can change it._\n* **Header and footer.** _Separated from table body._\n* **Multiline cells support.** _See [_example/main.go/_example/04-multiline/main.go](https://github.com/alexeyco/simpletable/blob/master/_example/04-multiline/main.go) for example._\n* **Cell content alignment.** _Left, right or center._\n* **Row spanning.** _By analogy with the way it is done in HTML. See `Cell.Span` attribute \n  description._\n* **Fast!** _Really fast, see [_example/main.go/_example/03-benchmarks-with-others](https://github.com/alexeyco/simpletable/blob/master/_example/03-benchmarks-with-others)._\n\n## Installation\n```\n$ go get -u github.com/alexeyco/simpletable\n```\nTo run unit tests:\n```\n$ cd $GOPATH/src/github.com/alexeyco/simpletable\n$ go test -cover\n```\nTo run benchmarks:\n```\n$ cd $GOPATH/src/github.com/alexeyco/simpletable\n$ go test -bench=.\n```\nComparison with similar libraries see [_example/main.go/_example/03-benchmarks-with-others](https://github.com/alexeyco/simpletable/blob/master/_example/03-benchmarks-with-others)\n\n## Basic example\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/alexeyco/simpletable\"\n)\n\nvar (\n\tdata = [][]interface{}{\n\t\t{1, \"Newton G. Goetz\", 532.7},\n\t\t{2, \"Rebecca R. Edney\", 1423.25},\n\t\t{3, \"John R. Jackson\", 7526.12},\n\t\t{4, \"Ron J. Gomes\", 123.84},\n\t\t{5, \"Penny R. Lewis\", 3221.11},\n\t}\n)\n\nfunc main() {\n\ttable := simpletable.New()\n\n\ttable.Header = \u0026simpletable.Header{\n\t\tCells: []*simpletable.Cell{\n\t\t\t{Align: simpletable.AlignCenter, Text: \"#\"},\n\t\t\t{Align: simpletable.AlignCenter, Text: \"NAME\"},\n\t\t\t{Align: simpletable.AlignCenter, Text: \"TAX\"},\n\t\t},\n\t}\n\n\tsubtotal := float64(0)\n\tfor _, row := range data {\n\t\tr := []*simpletable.Cell{\n\t\t\t{Align: simpletable.AlignRight, Text: fmt.Sprintf(\"%d\", row[0].(int))},\n\t\t\t{Text: row[1].(string)},\n\t\t\t{Align: simpletable.AlignRight, Text: fmt.Sprintf(\"$ %.2f\", row[2].(float64))},\n\t\t}\n\n\t\ttable.Body.Cells = append(table.Body.Cells, r)\n\t\tsubtotal += row[2].(float64)\n\t}\n\n\ttable.Footer = \u0026simpletable.Footer{\n\t\tCells: []*simpletable.Cell{\n\t\t\t{},\n\t\t\t{Align: simpletable.AlignRight, Text: \"Subtotal\"},\n\t\t\t{Align: simpletable.AlignRight, Text: fmt.Sprintf(\"$ %.2f\", subtotal)},\n\t\t},\n\t}\n\n\ttable.SetStyle(simpletable.StyleCompactLite)\n\tfmt.Println(table.String())\n}\n```\n\nResult:\n```\n #         NAME            TAX\n--- ------------------ ------------\n 1   Newton G. Goetz      $ 532.70\n 2   Rebecca R. Edney    $ 1423.25\n 3   John R. Jackson     $ 7526.12\n 4   Ron J. Gomes         $ 123.84\n 5   Penny R. Lewis      $ 3221.11\n--- ------------------ ------------\n             Subtotal   $ 12827.02\n```\n\nYou can see also [_example/main.go/01-styles-demo/main.go](https://github.com/alexeyco/simpletable/blob/master/_example/01-styles-demo/main.go) for styles demonstration.\n```\n$ cd $GOPATH/src/github.com/alexeyco/simpletable/_example/01-styles-demo\n$ go run main.go\n```\n\nMore examples:\nFor more examples see [_example](https://github.com/alexeyco/simpletable/tree/master/_example) directory:\n```\n$ cd $GOPATH/src/github.com/alexeyco/simpletable/_example\n$ ls -F | grep /\n\n01-styles-demo/\n02-ugly-span/\n03-benchmarks-with-others/\n04-multiline/\n```\n\n## Styling\nThere is 6 styles available. To view them, run [_example/main.go/01-styles-demo/main.go](https://github.com/alexeyco/simpletable/blob/master/_example/01-styles-demo/main.go):\n```\n$ cd $GOPATH/src/github.com/alexeyco/simpletable/_example/01-styles-demo\n$ go run main.go\n```\n\n## Cell content alignment\nYou can set cell content alignment:\n```go\nc := \u0026simpletable.Cell{\n\t// or simpletable.AlignLeft (default), or simpletable.AlignCenter\n\tAlign:   simpletable.AlignRight, \n\tContent: \"Subtotal\",\n}\n```\n\n## Column spanning\nBy analogy with HTML:\n```go\nc := \u0026simpletable.Cell{\n\tSpan:    2, // Default: 1\n\tContent: \"Subtotal\",\n}\n```\nNote: by default `Span` is `1`. If you try to set it to `0`, the value will still be `1`.\n\n## License\n```\nCopyright (c) 2017 Alexey Popov\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","funding_links":[],"categories":["命令行","Command Line","Misc","Build Automation","Go","Tools","高级控制台UI`用于构建控制台应用程序和控制台用户界面的库.`","高级控制台UI"],"sub_categories":["高级控制台用户界面","Advanced Console UIs","标准 CLI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexeyco%2Fsimpletable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexeyco%2Fsimpletable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexeyco%2Fsimpletable/lists"}