{"id":18328966,"url":"https://github.com/dollarshaveclub/line","last_synced_at":"2025-04-06T01:32:28.991Z","repository":{"id":57499830,"uuid":"114683078","full_name":"dollarshaveclub/line","owner":"dollarshaveclub","description":"An easy to use golang package for stylizing terminal output","archived":false,"fork":false,"pushed_at":"2020-01-02T23:44:08.000Z","size":57,"stargazers_count":27,"open_issues_count":1,"forks_count":3,"subscribers_count":48,"default_branch":"master","last_synced_at":"2025-03-21T15:11:04.623Z","etag":null,"topics":["ansi-colors","color","colors","go","golang","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/dollarshaveclub.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-12-18T20:08:02.000Z","updated_at":"2022-09-14T03:54:23.000Z","dependencies_parsed_at":"2022-08-28T14:21:16.136Z","dependency_job_id":null,"html_url":"https://github.com/dollarshaveclub/line","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dollarshaveclub%2Fline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dollarshaveclub%2Fline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dollarshaveclub%2Fline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dollarshaveclub%2Fline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dollarshaveclub","download_url":"https://codeload.github.com/dollarshaveclub/line/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423476,"owners_count":20936621,"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":["ansi-colors","color","colors","go","golang","terminal"],"created_at":"2024-11-05T19:15:48.221Z","updated_at":"2025-04-06T01:32:27.995Z","avatar_url":"https://github.com/dollarshaveclub.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# line   \u0026nbsp;\u003cimg src=\"doc/images/line-v.png\" width=\"25\" height=\"25\"/\u003e\n[![GoDoc](https://godoc.org/github.com/dollarshaveclub/line?status.svg)](http://godoc.org/github.com/dollarshaveclub/line)\n[![CircleCI](https://circleci.com/gh/dollarshaveclub/line/tree/master.svg?style=shield)](https://circleci.com/gh/dollarshaveclub/line/tree/master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/dollarshaveclub/line)](https://goreportcard.com/report/github.com/dollarshaveclub/line)\n\nline is an easy to use package for stylizing terminal output. line focuses on usability via chaining and, consequently, is quite flexible. line also boasts compatibility with the popular [Color](https://github.com/fatih/color) package.\n\n## Install\n\n```bash\ngo get github.com/dollarshaveclub/line\n```\n\n## Usage\n\n### Simple\n\n```go\npackage main\n\nimport \"github.com/dollarshaveclub/line\"\n\nfunc main() {\n    line.Red().Print(\"Hello \").Green(\"World\").Blue().Println(\"!!!\")\n}\n```\n![Simple Usage](doc/images/simple.png)\n\n### Prefix / Suffix\n\n```go\npackage main\n\nimport \"github.com/dollarshaveclub/line\"\n\nfunc main() {\n\tline.Prefix(\"--\u003e \").Suffix(\" \u003c---\").Println(\"Nice to meet you!\").Println(\"And you too!\")\n}\n```\n![Prefix / Suffix Usage](doc/images/prefix-suffix.png)\n\n### Complex\n\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/dollarshaveclub/line\"\n\t\"github.com/fatih/color\"\n)\n\nfunc main() {\n\toutput := line.New(os.Stdout, \"\", \"\", line.WhiteColor)\n\toutput.Println(\"Welcome! Here is a list:\")\n\n\tli := output.Prefix(\"--\u003e \").Red()\n\tli.Println(\"one\").Println(\"two\").Println(\"sub\")\n\n\tsubli := li.Prefix(\"  --\u003e \").Green()\n\tsubli.Println(\"a\").Println(\"b\")\n\n\toutput.Println()\n\n\tboldgreen := color.New(color.Bold, color.FgMagenta)\n\toutput.Format(boldgreen).Println(\"Have a nice day!\")\n}\n```\n![Complex Usage](doc/images/complex.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdollarshaveclub%2Fline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdollarshaveclub%2Fline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdollarshaveclub%2Fline/lists"}