{"id":13365337,"url":"https://github.com/mattn/Go-colorable","last_synced_at":"2025-03-12T17:31:37.903Z","repository":{"id":19172845,"uuid":"22405117","full_name":"mattn/go-colorable","owner":"mattn","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-17T17:59:04.000Z","size":158,"stargazers_count":766,"open_issues_count":9,"forks_count":93,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-10-29T15:12:00.662Z","etag":null,"topics":["color","go","golang","windows"],"latest_commit_sha":null,"homepage":"http://godoc.org/github.com/mattn/go-colorable","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/mattn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"mattn","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2014-07-30T02:38:06.000Z","updated_at":"2024-10-21T15:08:26.000Z","dependencies_parsed_at":"2024-02-06T01:33:39.000Z","dependency_job_id":null,"html_url":"https://github.com/mattn/go-colorable","commit_stats":{"total_commits":116,"total_committers":21,"mean_commits":5.523809523809524,"dds":0.3620689655172413,"last_synced_commit":"2b733b5d5ca7f3959b874da32dd775822a35a1a2"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattn%2Fgo-colorable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattn%2Fgo-colorable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattn%2Fgo-colorable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattn%2Fgo-colorable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattn","download_url":"https://codeload.github.com/mattn/go-colorable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243262061,"owners_count":20262948,"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":["color","go","golang","windows"],"created_at":"2024-07-30T00:01:05.037Z","updated_at":"2025-03-12T17:31:37.872Z","avatar_url":"https://github.com/mattn.png","language":"Go","funding_links":["https://github.com/sponsors/mattn"],"categories":["命令行"],"sub_categories":["高级控制台界面","高級控制台界面"],"readme":"# go-colorable\n\n[![Build Status](https://github.com/mattn/go-colorable/workflows/test/badge.svg)](https://github.com/mattn/go-colorable/actions?query=workflow%3Atest)\n[![Codecov](https://codecov.io/gh/mattn/go-colorable/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-colorable)\n[![GoDoc](https://godoc.org/github.com/mattn/go-colorable?status.svg)](http://godoc.org/github.com/mattn/go-colorable)\n[![Go Report Card](https://goreportcard.com/badge/mattn/go-colorable)](https://goreportcard.com/report/mattn/go-colorable)\n\nColorable writer for windows.\n\nFor example, most of logger packages doesn't show colors on windows. (I know we can do it with ansicon. But I don't want.)\nThis package is possible to handle escape sequence for ansi color on windows.\n\n## Too Bad!\n\n![](https://raw.githubusercontent.com/mattn/go-colorable/gh-pages/bad.png)\n\n\n## So Good!\n\n![](https://raw.githubusercontent.com/mattn/go-colorable/gh-pages/good.png)\n\n## Usage\n\n```go\nlogrus.SetFormatter(\u0026logrus.TextFormatter{ForceColors: true})\nlogrus.SetOutput(colorable.NewColorableStdout())\n\nlogrus.Info(\"succeeded\")\nlogrus.Warn(\"not correct\")\nlogrus.Error(\"something error\")\nlogrus.Fatal(\"panic\")\n```\n\nYou can compile above code on non-windows OSs.\n\n## Installation\n\n```\n$ go get github.com/mattn/go-colorable\n```\n\n# License\n\nMIT\n\n# Author\n\nYasuhiro Matsumoto (a.k.a mattn)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattn%2FGo-colorable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattn%2FGo-colorable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattn%2FGo-colorable/lists"}