{"id":51043736,"url":"https://github.com/floatpane/go-emoji-shortcode","last_synced_at":"2026-06-22T12:02:23.501Z","repository":{"id":366555810,"uuid":"1276776356","full_name":"floatpane/go-emoji-shortcode","owner":"floatpane","description":"Shortcode Unicode emoji library for Go","archived":false,"fork":false,"pushed_at":"2026-06-22T09:46:12.000Z","size":142,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-22T11:21:11.127Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://emoji.floatpane.com","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/floatpane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"floatpane"}},"created_at":"2026-06-22T09:28:07.000Z","updated_at":"2026-06-22T09:38:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/floatpane/go-emoji-shortcode","commit_stats":null,"previous_names":["floatpane/go-emoji-shortcode"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/floatpane/go-emoji-shortcode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatpane%2Fgo-emoji-shortcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatpane%2Fgo-emoji-shortcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatpane%2Fgo-emoji-shortcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatpane%2Fgo-emoji-shortcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/floatpane","download_url":"https://codeload.github.com/floatpane/go-emoji-shortcode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatpane%2Fgo-emoji-shortcode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34647750,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"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":[],"created_at":"2026-06-22T12:02:22.660Z","updated_at":"2026-06-22T12:02:23.492Z","avatar_url":"https://github.com/floatpane.png","language":"Go","funding_links":["https://github.com/sponsors/floatpane"],"categories":[],"sub_categories":[],"readme":"# go-emoji-shortcode\n\n[![Go Version](https://img.shields.io/github/go-mod/go-version/floatpane/go-emoji-shortcode)](https://golang.org)\n[![Go Reference](https://pkg.go.dev/badge/github.com/floatpane/go-emoji-shortcode.svg)](https://pkg.go.dev/github.com/floatpane/go-emoji-shortcode)\n[![CI](https://github.com/floatpane/go-emoji-shortcode/actions/workflows/ci.yml/badge.svg)](https://github.com/floatpane/go-emoji-shortcode/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\nA small, dependency-free Go library for mapping emoji shortcodes (`:smile:`, `:heart:`, ...) to Unicode emoji characters. It is designed for text editors and TUI composers that want live shortcode preview and suggestion support.\n\nExtracted from [matcha](https://github.com/floatpane/matcha) so it can be reused by other Go projects.\n\n## Install\n\n```bash\ngo get github.com/floatpane/go-emoji-shortcode\n```\n\nRequires Go 1.26+.\n\n## Usage\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n\n    \"github.com/floatpane/go-emoji-shortcode\"\n)\n\nfunc main() {\n    e, ok := shortcode.Lookup(\"smile\")\n    if ok {\n        fmt.Println(e) // 😄\n    }\n\n    matches := shortcode.Suggest(\"sm\")\n    for _, m := range matches {\n        fmt.Printf(\"%s -\u003e %s\\n\", m.Code, m.Emoji)\n    }\n}\n```\n\n## API\n\n- `Lookup(shortcode string) (emoji string, ok bool)` — exact shortcode to emoji.\n- `Suggest(prefix string) []Match` — fuzzy-matched suggestions for a prefix (e.g. `\"sm\"` matches `:smile:`, `:smirk:`, ...). Results are sorted by relevance.\n- `All() []Match` — every known shortcode/emoji pair.\n\n## Documentation\n\nFull API reference: [pkg.go.dev/github.com/floatpane/go-emoji-shortcode](https://pkg.go.dev/github.com/floatpane/go-emoji-shortcode)\n\n## Contributing\n\nPRs welcome. See [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloatpane%2Fgo-emoji-shortcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffloatpane%2Fgo-emoji-shortcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloatpane%2Fgo-emoji-shortcode/lists"}