{"id":24196716,"url":"https://github.com/pchchv/bdd","last_synced_at":"2026-05-10T16:18:11.428Z","repository":{"id":143000466,"uuid":"613777634","full_name":"pchchv/bdd","owner":"pchchv","description":"Beautiful data display for Go","archived":false,"fork":false,"pushed_at":"2023-03-15T10:30:58.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-03T08:23:38.734Z","etag":null,"topics":["fmt","go","go-library","golang","golang-library","golang-package","prettier","prettify"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pchchv.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}},"created_at":"2023-03-14T08:54:09.000Z","updated_at":"2023-03-15T10:46:49.000Z","dependencies_parsed_at":"2023-04-23T19:33:09.118Z","dependency_job_id":null,"html_url":"https://github.com/pchchv/bdd","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pchchv/bdd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchchv%2Fbdd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchchv%2Fbdd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchchv%2Fbdd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchchv%2Fbdd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pchchv","download_url":"https://codeload.github.com/pchchv/bdd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchchv%2Fbdd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271113692,"owners_count":24701612,"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-08-19T02:00:09.176Z","response_time":63,"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":["fmt","go","go-library","golang","golang-library","golang-package","prettier","prettify"],"created_at":"2025-01-13T19:37:32.757Z","updated_at":"2026-05-10T16:18:06.384Z","avatar_url":"https://github.com/pchchv.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **bdd** [![Go Report Card](https://goreportcard.com/badge/github.com/pchchv/bdd)](https://goreportcard.com/report/github.com/pchchv/bdd) [![Go Reference](https://pkg.go.dev/badge/github.com/pchchv/bdd.svg)](https://pkg.go.dev/github.com/pchchv/bdd) [![GitHub license](https://img.shields.io/github/license/pchchv/bdd.svg)](https://github.com/pchchv/bdd/blob/master/LICENSE)\n\n### **B**eautiful **d**ata **d**isplay for Go\n\n## Usage\n\n## *Import*\n```go\nimport \"github.com/pchchv/bdd\"\n```\n\n**[Examples](https://github.com/pchchv/bdd/blob/master/examples/main.go)**\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pchchv/bdd\"\n)\n\ntype mt struct {\n\tString string\n\tInt    int\n\tSlice  []int\n\tMap    map[string]interface{}\n}\n\nfunc main() {\n\tm := mt{\n\t\t\"hello world\",\n\t\t100,\n\t\t[]int{1, 2, 3, 4, 5, 6},\n\t\tmap[string]interface{}{\n\t\t\t\"A\":  123,\n\t\t\t\"BB\": 456,\n\t\t},\n\t}\n\n\tfmt.Println(m) // fmt Default Output\n\t/*\n\t\t{hello world 100 [1 2 3 4 5 6] map[BB:456 A:123]}\n\t*/\n\n\tbdd.Puts(m) // More friendly output\n\t/*\n\t\t{\n\t\t String: \"hello world\"\n\t\t Int:    100\n\t\t Slice:  [\n\t\t  1 2 3\n\t\t  4 5 6\n\t\t ]\n\t\t Map: {\n\t\t  \"A\":  123\n\t\t  \"BB\": 456\n\t\t }\n\t\t}\n\t*/\n\n\tbdd.Print(m) // Same as Puts, but without the quotation marks\n\t/*\n\t\t{\n\t\t String: hello world\n\t\t Int:    100\n\t\t Slice:  [\n\t\t  1 2 3\n\t\t  4 5 6\n\t\t ]\n\t\t Map: {\n\t\t  A:  123\n\t\t  BB: 456\n\t\t }\n\t\t}\n\t*/\n\n\tbdd.P(m) // Friendly formatting plus type\n\t/*\n\t\tmain.mt{\n\t\t String: string(\"hello world\")\n\t\t Int:    int(100)\n\t\t Slice:  []int[\n\t\t  int(1) int(2) int(3)\n\t\t  int(4) int(5) int(6)\n\t\t ]\n\t\t Map: map[string]interface {}{\n\t\t  string(\"A\"):  int(123)\n\t\t  string(\"BB\"): int(456)\n\t\t }\n\t\t}\n\t*/\n\n\tbdd.Pjson(m) // Output in json style\n\t/*\n\t\t{\n\t\t \"Int\": 100\n\t\t,\"Map\": {\n\t\t  \"A\":  123\n\t\t ,\"BB\": 456\n\t\t }\n\t\t,\"Slice\": [\n\t\t  1,2,3\n\t\t ,4,5,6\n\t\t ]\n\t\t,\"String\": \"hello world\"\n\t\t}\n\t*/\n\n\tm0 := bdd.ToTable(m, m) // Split into tables by field\n\tbdd.Puts(m0)\n\t/*\n\t\t[\n\t\t [\n\t\t  \"String\" \"Int\"\n\t\t  \"Slice\"  \"Map\"\n\t\t ]\n\t\t [\n\t\t  \"hello world\"   \"100\"\n\t\t  \"[1 2 3 4 5 6]\" \"map[A:123 BB:456]\"\n\t\t ]\n\t\t]\n\t*/\n\n\tm1 := bdd.FmtTable(m0) // [][]string Table Formatting\n\tbdd.Puts(m1)\n\t/*\n\t\t[\n\t\t \"String      Int Slice         Map               \"\n\t\t \"hello world 100 [1 2 3 4 5 6] map[A:123 BB:456] \"\n\t\t]\n\t*/\n\n\tbdd.Mark(\"hello\") // Mark output position\n\t/*\n\t\tmain.go:124  hello\n\t*/\n\n\tbdd.Print(bdd.BytesViewer(\"Hello world! Hello All!\"))\n\t/*\n\t\t| Address  | Hex                                             | Text             |\n\t\t| -------: | :---------------------------------------------- | :--------------- |\n\t\t| 00000000 | 48 65 6c 6c 6f 20 77 6f 72 6c 64 21 20 48 65 6c | Hello world! Hel |\n\t\t| 00000010 | 6c 6f 20 41 6c 6c 21                            | lo All!          |\n\t*/\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpchchv%2Fbdd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpchchv%2Fbdd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpchchv%2Fbdd/lists"}