{"id":17166661,"url":"https://github.com/willf/pad","last_synced_at":"2025-04-13T15:25:41.852Z","repository":{"id":57480319,"uuid":"55066828","full_name":"willf/pad","owner":"willf","description":"Left and Right padding of strings for Go ","archived":false,"fork":false,"pushed_at":"2020-03-13T20:24:18.000Z","size":6,"stargazers_count":34,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T20:13:02.144Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/willf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-30T13:48:03.000Z","updated_at":"2024-07-27T15:32:36.000Z","dependencies_parsed_at":"2022-09-26T17:41:39.866Z","dependency_job_id":null,"html_url":"https://github.com/willf/pad","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/willf%2Fpad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willf%2Fpad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willf%2Fpad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willf%2Fpad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willf","download_url":"https://codeload.github.com/willf/pad/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248734072,"owners_count":21153142,"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":[],"created_at":"2024-10-14T23:06:18.918Z","updated_at":"2025-04-13T15:25:41.828Z","avatar_url":"https://github.com/willf.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"pad\n-------------\n\n[![Join the chat at https://gitter.im/willf/pad](https://badges.gitter.im/willf/pad.svg)](https://gitter.im/willf/pad?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n[![Build Status](https://travis-ci.org/willf/pad.svg?branch=master)](https://travis-ci.org/willf/pad)\n\nA golang implementation of the [left-pad javascript library](https://www.npmjs.com/package/left-pad)\n\nI was inspired by [Stew](https://twitter.com/StewOConnor)'s [`left-cats`](https://github.com/stew/left-cats), who was inspired by [this article](http://arstechnica.com/information-technology/2016/03/rage-quit-coder-unpublished-17-lines-of-javascript-and-broke-the-internet/), to port this to Go. \n\nThis implementation will let you pad byte-strings and UTF-8 encoded strings\n\nexample usage:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/willf/pad\"\n\tpadUtf8 \"github.com/willf/pad/utf8\"\n)\n\nfunc main() {\n\tfmt.Println(pad.Right(\"Hello\", 20, \"!\"))\n\tfmt.Println(padUtf8.Left(\"Exit now\", 20, \"→\"))\n}\n```\n\n```bash\n\u003e go run example.go\nHello!!!!!!!!!!!!!!!\n→→→→→→→→→→→→Exit now\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillf%2Fpad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillf%2Fpad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillf%2Fpad/lists"}