{"id":31890184,"url":"https://github.com/aquasecurity/table","last_synced_at":"2025-10-13T07:22:33.858Z","repository":{"id":40348956,"uuid":"491424372","full_name":"aquasecurity/table","owner":"aquasecurity","description":":abacus: Tables for terminals, in Go.","archived":false,"fork":false,"pushed_at":"2025-07-13T11:43:17.000Z","size":150,"stargazers_count":110,"open_issues_count":3,"forks_count":7,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-07-13T13:23:05.677Z","etag":null,"topics":["go","table","terminal","tui"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/aquasecurity/table","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/aquasecurity.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-12T08:18:48.000Z","updated_at":"2025-07-13T11:42:31.000Z","dependencies_parsed_at":"2025-07-13T13:15:48.436Z","dependency_job_id":"308f10fe-a71d-4c4f-b1e4-15e1531bec47","html_url":"https://github.com/aquasecurity/table","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/aquasecurity/table","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquasecurity%2Ftable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquasecurity%2Ftable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquasecurity%2Ftable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquasecurity%2Ftable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aquasecurity","download_url":"https://codeload.github.com/aquasecurity/table/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquasecurity%2Ftable/sbom","scorecard":{"id":204680,"data":{"date":"2025-08-11","repo":{"name":"github.com/aquasecurity/table","commit":"303272d80b80e1b7aba8db2357d26bd765d3284e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Maintained","score":0,"reason":"1 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":"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":"Code-Review","score":1,"reason":"Found 3/22 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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/lint.yml:8","Info: topLevel 'pull-requests' permission set to 'read': .github/workflows/lint.yml:9","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/aquasecurity/table/lint.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/aquasecurity/table/lint.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/aquasecurity/table/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/aquasecurity/table/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/aquasecurity/table/test.yml/main?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"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":"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":"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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"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":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0493 / GHSA-p782-xgp4-8hr8","Warn: Project is vulnerable to: GO-2022-0603 / GHSA-hp87-p4gw-j4gq"],"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 21 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-16T23:27:47.137Z","repository_id":40348956,"created_at":"2025-08-16T23:27:47.137Z","updated_at":"2025-08-16T23:27:47.137Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014111,"owners_count":26085463,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["go","table","terminal","tui"],"created_at":"2025-10-13T07:22:30.596Z","updated_at":"2025-10-13T07:22:33.851Z","avatar_url":"https://github.com/aquasecurity.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# table: Tables for terminals\n\nThis is a Go module for rendering tables in the terminal.\n\n![A fruity demonstration table](./_examples/99-ansi/screenshot.png)\n\n## Features\n\n- :arrow_up_down: Headers/footers\n- :leftwards_arrow_with_hook: Text wrapping\n- :twisted_rightwards_arrows: Auto-merging of cells\n- :interrobang: Customisable line/border characters\n- :rainbow: Customisable line/border colours\n- :play_or_pause_button: Individually enable/disable borders, row lines\n- :left_right_arrow: Set alignments on a per-column basis, with separate settings for headers/footers\n- :triangular_ruler: Intelligently wrap/pad/measure ANSI coloured input\n- :dancers: Support for double-width unicode characters\n- :bar_chart: Load data from CSV files\n\nCheck out the [documentation](https://pkg.go.dev/github.com/aquasecurity/table) for full features/usage.\n\n## Examples\n\n\u003c!--eg--\u003e\n### Example: Basic\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/aquasecurity/table\"\n)\n\nfunc main() {\n\n\tt := table.New(os.Stdout)\n\n\tt.SetHeaders(\"ID\", \"Fruit\", \"Stock\")\n\n\tt.AddRow(\"1\", \"Apple\", \"14\")\n\tt.AddRow(\"2\", \"Banana\", \"88,041\")\n\tt.AddRow(\"3\", \"Cherry\", \"342\")\n\tt.AddRow(\"4\", \"Dragonfruit\", \"1\")\n\n\tt.Render()\n}\n\n```\n\n#### Output\n```\n┌────┬─────────────┬────────┐\n│ ID │    Fruit    │ Stock  │\n├────┼─────────────┼────────┤\n│ 1  │ Apple       │ 14     │\n├────┼─────────────┼────────┤\n│ 2  │ Banana      │ 88,041 │\n├────┼─────────────┼────────┤\n│ 3  │ Cherry      │ 342    │\n├────┼─────────────┼────────┤\n│ 4  │ Dragonfruit │ 1      │\n└────┴─────────────┴────────┘\n\n```\n\n### Example: No Row Lines\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/aquasecurity/table\"\n)\n\nfunc main() {\n\n\tt := table.New(os.Stdout)\n\tt.SetRowLines(false)\n\n\tt.SetHeaders(\"ID\", \"Fruit\", \"Stock\")\n\n\tt.AddRow(\"1\", \"Apple\", \"14\")\n\tt.AddRow(\"2\", \"Banana\", \"88,041\")\n\tt.AddRow(\"3\", \"Cherry\", \"342\")\n\tt.AddRow(\"4\", \"Dragonfruit\", \"1\")\n\n\tt.Render()\n}\n\n```\n\n#### Output\n```\n┌────┬─────────────┬────────┐\n│ ID │    Fruit    │ Stock  │\n├────┼─────────────┼────────┤\n│ 1  │ Apple       │ 14     │\n│ 2  │ Banana      │ 88,041 │\n│ 3  │ Cherry      │ 342    │\n│ 4  │ Dragonfruit │ 1      │\n└────┴─────────────┴────────┘\n\n```\n\n### Example: No Borders\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/aquasecurity/table\"\n)\n\nfunc main() {\n\n\tt := table.New(os.Stdout)\n\tt.SetBorders(false)\n\n\tt.SetHeaders(\"ID\", \"Fruit\", \"Stock\")\n\n\tt.AddRow(\"1\", \"Apple\", \"14\")\n\tt.AddRow(\"2\", \"Banana\", \"88,041\")\n\tt.AddRow(\"3\", \"Cherry\", \"342\")\n\tt.AddRow(\"4\", \"Dragonfruit\", \"1\")\n\n\tt.Render()\n}\n\n```\n\n#### Output\n```\n ID │    Fruit    │ Stock  \n────┼─────────────┼────────\n 1  │ Apple       │ 14     \n────┼─────────────┼────────\n 2  │ Banana      │ 88,041 \n────┼─────────────┼────────\n 3  │ Cherry      │ 342    \n────┼─────────────┼────────\n 4  │ Dragonfruit │ 1      \n\n```\n\n### Example: No Borders Or Row Lines\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/aquasecurity/table\"\n)\n\nfunc main() {\n\n\tt := table.New(os.Stdout)\n\tt.SetRowLines(false)\n\tt.SetBorders(false)\n\n\tt.SetHeaders(\"ID\", \"Fruit\", \"Stock\")\n\n\tt.AddRow(\"1\", \"Apple\", \"14\")\n\tt.AddRow(\"2\", \"Banana\", \"88,041\")\n\tt.AddRow(\"3\", \"Cherry\", \"342\")\n\tt.AddRow(\"4\", \"Dragonfruit\", \"1\")\n\n\tt.Render()\n}\n\n```\n\n#### Output\n```\n ID │    Fruit    │ Stock  \n────┼─────────────┼────────\n 1  │ Apple       │ 14     \n 2  │ Banana      │ 88,041 \n 3  │ Cherry      │ 342    \n 4  │ Dragonfruit │ 1      \n\n```\n\n### Example: Specific Borders\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/aquasecurity/table\"\n)\n\nfunc main() {\n\n\tt := table.New(os.Stdout)\n\tt.SetRowLines(false)\n\tt.SetBorderLeft(true)\n\tt.SetBorderRight(false)\n\tt.SetBorderTop(true)\n\tt.SetBorderBottom(false)\n\n\tt.SetHeaders(\"ID\", \"Fruit\", \"Stock\")\n\n\tt.AddRow(\"1\", \"Apple\", \"14\")\n\tt.AddRow(\"2\", \"Banana\", \"88,041\")\n\tt.AddRow(\"3\", \"Cherry\", \"342\")\n\tt.AddRow(\"4\", \"Dragonfruit\", \"1\")\n\n\tt.Render()\n}\n\n```\n\n#### Output\n```\n┌────┬─────────────┬────────\n│ ID │    Fruit    │ Stock  \n├────┼─────────────┼────────\n│ 1  │ Apple       │ 14     \n│ 2  │ Banana      │ 88,041 \n│ 3  │ Cherry      │ 342    \n│ 4  │ Dragonfruit │ 1      \n\n```\n\n### Example: Footers\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/aquasecurity/table\"\n)\n\nfunc main() {\n\n\tt := table.New(os.Stdout)\n\n\tt.SetHeaders(\"ID\", \"Fruit\", \"Stock\")\n\tt.SetRowLines(false)\n\tt.AddRow(\"1\", \"Apple\", \"14\")\n\tt.AddRow(\"2\", \"Banana\", \"88,041\")\n\tt.AddRow(\"3\", \"Cherry\", \"342\")\n\tt.AddRow(\"4\", \"Dragonfruit\", \"1\")\n\tt.SetFooters(\"\", \"Count\", \"4\")\n\tt.Render()\n}\n\n```\n\n#### Output\n```\n┌────┬─────────────┬────────┐\n│ ID │    Fruit    │ Stock  │\n├────┼─────────────┼────────┤\n│ 1  │ Apple       │ 14     │\n│ 2  │ Banana      │ 88,041 │\n│ 3  │ Cherry      │ 342    │\n│ 4  │ Dragonfruit │ 1      │\n├────┼─────────────┼────────┤\n│    │    Count    │   4    │\n└────┴─────────────┴────────┘\n\n```\n\n### Example: Padding\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/aquasecurity/table\"\n)\n\nfunc main() {\n\n\tt := table.New(os.Stdout)\n\tt.SetPadding(5)\n\n\tt.SetHeaders(\"ID\", \"Fruit\", \"Stock\")\n\n\tt.AddRow(\"1\", \"Apple\", \"14\")\n\tt.AddRow(\"2\", \"Banana\", \"88,041\")\n\tt.AddRow(\"3\", \"Cherry\", \"342\")\n\tt.AddRow(\"4\", \"Dragonfruit\", \"1\")\n\n\tt.Render()\n}\n\n```\n\n#### Output\n```\n┌────────────┬─────────────────────┬────────────────┐\n│     ID     │        Fruit        │     Stock      │\n├────────────┼─────────────────────┼────────────────┤\n│     1      │     Apple           │     14         │\n├────────────┼─────────────────────┼────────────────┤\n│     2      │     Banana          │     88,041     │\n├────────────┼─────────────────────┼────────────────┤\n│     3      │     Cherry          │     342        │\n├────────────┼─────────────────────┼────────────────┤\n│     4      │     Dragonfruit     │     1          │\n└────────────┴─────────────────────┴────────────────┘\n\n```\n\n### Example: Alignment\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/aquasecurity/table\"\n)\n\nfunc main() {\n\n\tt := table.New(os.Stdout)\n\tt.SetAlignment(table.AlignLeft, table.AlignCenter, table.AlignRight)\n\n\tt.SetHeaders(\"ID\", \"Fruit\", \"Stock\")\n\n\tt.AddRow(\"1\", \"Apple\", \"14\")\n\tt.AddRow(\"2\", \"Banana\", \"88,041\")\n\tt.AddRow(\"3\", \"Cherry\", \"342\")\n\tt.AddRow(\"4\", \"Dragonfruit\", \"1\")\n\n\tt.Render()\n}\n\n```\n\n#### Output\n```\n┌────┬─────────────┬────────┐\n│ ID │    Fruit    │ Stock  │\n├────┼─────────────┼────────┤\n│ 1  │    Apple    │     14 │\n├────┼─────────────┼────────┤\n│ 2  │   Banana    │ 88,041 │\n├────┼─────────────┼────────┤\n│ 3  │   Cherry    │    342 │\n├────┼─────────────┼────────┤\n│ 4  │ Dragonfruit │      1 │\n└────┴─────────────┴────────┘\n\n```\n\n### Example: Rounded Corners\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/aquasecurity/table\"\n)\n\nfunc main() {\n\n\tt := table.New(os.Stdout)\n\tt.SetDividers(table.UnicodeRoundedDividers)\n\n\tt.SetHeaders(\"ID\", \"Fruit\", \"Stock\")\n\n\tt.AddRow(\"1\", \"Apple\", \"14\")\n\tt.AddRow(\"2\", \"Banana\", \"88,041\")\n\tt.AddRow(\"3\", \"Cherry\", \"342\")\n\tt.AddRow(\"4\", \"Dragonfruit\", \"1\")\n\n\tt.Render()\n}\n\n```\n\n#### Output\n```\n╭────┬─────────────┬────────╮\n│ ID │    Fruit    │ Stock  │\n├────┼─────────────┼────────┤\n│ 1  │ Apple       │ 14     │\n├────┼─────────────┼────────┤\n│ 2  │ Banana      │ 88,041 │\n├────┼─────────────┼────────┤\n│ 3  │ Cherry      │ 342    │\n├────┼─────────────┼────────┤\n│ 4  │ Dragonfruit │ 1      │\n╰────┴─────────────┴────────╯\n\n```\n\n### Example: Custom Dividers\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/aquasecurity/table\"\n)\n\nfunc main() {\n\n\tt := table.New(os.Stdout)\n\tt.SetDividers(table.Dividers{\n\t\tALL: \"@\",\n\t\tNES: \"@\",\n\t\tNSW: \"@\",\n\t\tNEW: \"@\",\n\t\tESW: \"@\",\n\t\tNE:  \"@\",\n\t\tNW:  \"@\",\n\t\tSW:  \"@\",\n\t\tES:  \"@\",\n\t\tEW:  \"~\",\n\t\tNS:  \"!\",\n\t})\n\n\tt.SetHeaders(\"ID\", \"Fruit\", \"Stock\")\n\n\tt.AddRow(\"1\", \"Apple\", \"14\")\n\tt.AddRow(\"2\", \"Banana\", \"88,041\")\n\tt.AddRow(\"3\", \"Cherry\", \"342\")\n\tt.AddRow(\"4\", \"Dragonfruit\", \"1\")\n\n\tt.Render()\n}\n\n```\n\n#### Output\n```\n@~~~~@~~~~~~~~~~~~~@~~~~~~~~@\n! ID !    Fruit    ! Stock  !\n@~~~~@~~~~~~~~~~~~~@~~~~~~~~@\n! 1  ! Apple       ! 14     !\n@~~~~@~~~~~~~~~~~~~@~~~~~~~~@\n! 2  ! Banana      ! 88,041 !\n@~~~~@~~~~~~~~~~~~~@~~~~~~~~@\n! 3  ! Cherry      ! 342    !\n@~~~~@~~~~~~~~~~~~~@~~~~~~~~@\n! 4  ! Dragonfruit ! 1      !\n@~~~~@~~~~~~~~~~~~~@~~~~~~~~@\n\n```\n\n### Example: Auto Merge Cells\n```go\npackage main\n\nimport (\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/aquasecurity/table\"\n)\n\nfunc main() {\n\n\tt := table.New(os.Stdout)\n\n\tt.SetAutoMerge(true)\n\n\tt.SetHeaders(\"System\", \"Status\", \"Last Check\")\n\n\tt.AddRow(\"Life Support\", \"OK\", time.Now().Format(time.Stamp))\n\tt.AddRow(\"Nuclear Generator\", \"OK\", time.Now().Add(-time.Minute).Format(time.Stamp))\n\tt.AddRow(\"Weapons Systems\", \"FAIL\", time.Now().Format(time.Stamp))\n\tt.AddRow(\"Shields\", \"OK\", time.Now().Format(time.Stamp))\n\n\tt.Render()\n}\n\n```\n\n#### Output\n```\n┌───────────────────┬────────┬────────────────┐\n│      System       │ Status │   Last Check   │\n├───────────────────┼────────┼────────────────┤\n│ Life Support      │ OK     │ May 2 09:28:05 │\n├───────────────────┤        ├────────────────┤\n│ Nuclear Generator │        │ May 2 09:27:05 │\n├───────────────────┼────────┼────────────────┤\n│ Weapons Systems   │ FAIL   │ May 2 09:28:05 │\n├───────────────────┼────────┤                │\n│ Shields           │ OK     │                │\n└───────────────────┴────────┴────────────────┘\n\n```\n\n### Example: Load Data From Csv\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/aquasecurity/table\"\n)\n\nfunc main() {\n\n\tf, err := os.Open(\"./_examples/12-load-data-from-csv/data.csv\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tt := table.New(os.Stdout)\n\tif err := t.LoadCSV(f, true); err != nil {\n\t\tpanic(err)\n\t}\n\tt.Render()\n}\n\n```\n\n#### Output\n```\n┌────┬────────────┬────────────────────────────────────────────┐\n│ Id │    Date    │                  Message                   │\n├────┼────────────┼────────────────────────────────────────────┤\n│ 1  │ 2022-05-12 │ Hello world!                               │\n├────┼────────────┼────────────────────────────────────────────┤\n│ 2  │ 2022-05-12 │ These messages are loaded from a CSV file. │\n├────┼────────────┼────────────────────────────────────────────┤\n│ 3  │ 2022-05-13 │ Incredible!                                │\n└────┴────────────┴────────────────────────────────────────────┘\n\n```\n\n### Example: Markdown Format\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/aquasecurity/table\"\n)\n\nfunc main() {\n\tt := table.New(os.Stdout)\n\tt.SetDividers(table.MarkdownDividers)\n\n\tt.SetBorderTop(false)\n\tt.SetBorderBottom(false)\n\tt.SetRowLines(false)\n\n\tt.SetHeaders(\"ID\", \"Fruit\", \"Stock\")\n\n\tt.AddRow(\"1\", \"Apple\", \"14\")\n\tt.AddRow(\"2\", \"Banana\", \"88,041\")\n\tt.AddRow(\"3\", \"Cherry\", \"342\")\n\tt.AddRow(\"4\", \"Dragonfruit\", \"1\")\n\n\tt.Render()\n}\n\n```\n\n#### Output\n```\n| ID |    Fruit    | Stock  |\n|----|-------------|--------|\n| 1  | Apple       | 14     |\n| 2  | Banana      | 88,041 |\n| 3  | Cherry      | 342    |\n| 4  | Dragonfruit | 1      |\n\n```\n\n### Example: Header Colspans\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/aquasecurity/table\"\n)\n\nfunc main() {\n\tt := table.New(os.Stdout)\n\tt.SetHeaders(\"Namespace\", \"Resource\", \"Vulnerabilities\", \"Misconfigurations\")\n\tt.AddHeaders(\"Namespace\", \"Resource\", \"Critical\", \"High\", \"Medium\", \"Low\", \"Unknown\", \"Critical\", \"High\", \"Medium\", \"Low\", \"Unknown\")\n\tt.SetHeaderColSpans(0, 1, 1, 5, 5)\n\tt.SetAutoMergeHeaders(true)\n\tt.AddRow(\"default\", \"Deployment/app\", \"2\", \"5\", \"7\", \"8\", \"0\", \"0\", \"3\", \"5\", \"19\", \"0\")\n\tt.AddRow(\"default\", \"Ingress/test\", \"-\", \"-\", \"-\", \"-\", \"-\", \"1\", \"0\", \"2\", \"17\", \"0\")\n\tt.AddRow(\"default\", \"Service/test\", \"0\", \"0\", \"0\", \"1\", \"0\", \"3\", \"0\", \"4\", \"9\", \"0\")\n\tt.Render()\n}\n\n```\n\n#### Output\n```\n┌───────────┬────────────────┬──────────────────────────────────────────┬──────────────────────────────────────────┐\n│ Namespace │    Resource    │             Vulnerabilities              │            Misconfigurations             │\n│           │                ├──────────┬──────┬────────┬─────┬─────────┼──────────┬──────┬────────┬─────┬─────────┤\n│           │                │ Critical │ High │ Medium │ Low │ Unknown │ Critical │ High │ Medium │ Low │ Unknown │\n├───────────┼────────────────┼──────────┼──────┼────────┼─────┼─────────┼──────────┼──────┼────────┼─────┼─────────┤\n│ default   │ Deployment/app │ 2        │ 5    │ 7      │ 8   │ 0       │ 0        │ 3    │ 5      │ 19  │ 0       │\n├───────────┼────────────────┼──────────┼──────┼────────┼─────┼─────────┼──────────┼──────┼────────┼─────┼─────────┤\n│ default   │ Ingress/test   │ -        │ -    │ -      │ -   │ -       │ 1        │ 0    │ 2      │ 17  │ 0       │\n├───────────┼────────────────┼──────────┼──────┼────────┼─────┼─────────┼──────────┼──────┼────────┼─────┼─────────┤\n│ default   │ Service/test   │ 0        │ 0    │ 0      │ 1   │ 0       │ 3        │ 0    │ 4      │ 9   │ 0       │\n└───────────┴────────────────┴──────────┴──────┴────────┴─────┴─────────┴──────────┴──────┴────────┴─────┴─────────┘\n\n```\n\n### Example: Only Wrap When Needed\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/aquasecurity/table\"\n)\n\nfunc main() {\n\n\tt := table.New(os.Stdout)\n\n\tt.SetHeaders(\"ID\", \"Fruit\", \"Stock\")\n\n\tt.AddRow(\"1\", \"01234567890123456789012345678901234567890123456789012345678901234567890123456789\", \"14\")\n\tt.AddRow(\"2\", \"Banana\", \"88,041\")\n\tt.AddRow(\"3\", \"Cherry\", \"342\")\n\tt.AddRow(\"4\", \"Dragonfruit\", \"1\")\n\n\tt.Render()\n}\n\n```\n\n#### Output\n```\n┌────┬──────────────────────────────────────────────────────────────┬────────┐\n│ ID │                            Fruit                             │ Stock  │\n├────┼──────────────────────────────────────────────────────────────┼────────┤\n│ 1  │ 01234567890123456789012345678901234567890123456789012345678- │ 14     │\n│    │ 901234567890123456789                                        │        │\n├────┼──────────────────────────────────────────────────────────────┼────────┤\n│ 2  │ Banana                                                       │ 88,041 │\n├────┼──────────────────────────────────────────────────────────────┼────────┤\n│ 3  │ Cherry                                                       │ 342    │\n├────┼──────────────────────────────────────────────────────────────┼────────┤\n│ 4  │ Dragonfruit                                                  │ 1      │\n└────┴──────────────────────────────────────────────────────────────┴────────┘\n\n```\n\u003c!--/eg--\u003e\n\n## Example: Double-width Unicode\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/aquasecurity/table\"\n)\n\nfunc main() {\n\tt := table.New(os.Stdout)\n\tt.SetHeaders(\"A\", \"B\", \"C\")\n\tt.AddRow(\"🔥 unicode 🔥 characters 🔥\", \"2\", \"3\")\n\tt.AddRow(\"4\", \"5\", \"6\")\n\tt.Render()\n}\n\n```\n\n#### Output\n![a table with double-width runes](./_examples/95-double-width-unicode/screenshot.png)\n\n## Example: ANSI Colours\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/aquasecurity/table\"\n\t\"github.com/liamg/tml\"\n)\n\nfunc main() {\n\n\tt := table.New(os.Stdout)\n\n\tt.SetHeaders(\"ID\", \"Fruit\", \"Stock\", \"Description\")\n\tt.SetHeaderStyle(table.StyleBold)\n\tt.SetLineStyle(table.StyleBlue)\n\tt.SetDividers(table.UnicodeRoundedDividers)\n\n\tt.AddRow(\"1\", tml.Sprintf(\"\u003cgreen\u003eApple\u003c/green\u003e\"), \"14\", tml.Sprintf(\"An apple is an edible fruit produced by an apple tree (\u003citalic\u003eMalus domestica\u003c/italic\u003e). \"))\n\tt.AddRow(\"2\", tml.Sprintf(\"\u003cyellow\u003eBanana\u003c/yellow\u003e\"), \"88,041\", \"A banana is an elongated, edible fruit - botanically a berry.\")\n\tt.AddRow(\"3\", tml.Sprintf(\"\u003cred\u003eCherry\u003c/red\u003e\"), \"342\", \"A cherry is the fruit of many plants of the genus Prunus, and is a fleshy drupe (stone fruit). \")\n\tt.AddRow(\"4\", tml.Sprintf(\"\u003cmagenta\u003eDragonfruit\u003c/magenta\u003e\"), \"1\", \"A dragonfruit is the fruit of several different cactus species indigenous to the Americas.\")\n\n\tt.Render()\n}\n```\n\n#### Output\n![a colourful table](./_examples/99-ansi/screenshot.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faquasecurity%2Ftable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faquasecurity%2Ftable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faquasecurity%2Ftable/lists"}