{"id":36522831,"url":"https://github.com/zpatrick/go-bytesize","last_synced_at":"2026-01-17T15:36:24.596Z","repository":{"id":57483550,"uuid":"81880670","full_name":"zpatrick/go-bytesize","owner":"zpatrick","description":"Utility package for working with common memory and cpu units in Go","archived":false,"fork":false,"pushed_at":"2017-02-14T18:20:54.000Z","size":12,"stargazers_count":30,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-12T05:27:55.439Z","etag":null,"topics":["byte","bytes","bytesize","go","golang"],"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/zpatrick.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-02-13T22:56:51.000Z","updated_at":"2024-05-08T23:52:27.000Z","dependencies_parsed_at":"2022-09-05T06:21:01.407Z","dependency_job_id":null,"html_url":"https://github.com/zpatrick/go-bytesize","commit_stats":null,"previous_names":["zpatrick/go-byte"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zpatrick/go-bytesize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zpatrick%2Fgo-bytesize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zpatrick%2Fgo-bytesize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zpatrick%2Fgo-bytesize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zpatrick%2Fgo-bytesize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zpatrick","download_url":"https://codeload.github.com/zpatrick/go-bytesize/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zpatrick%2Fgo-bytesize/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28511695,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["byte","bytes","bytesize","go","golang"],"created_at":"2026-01-12T02:52:43.724Z","updated_at":"2026-01-17T15:36:24.588Z","avatar_url":"https://github.com/zpatrick.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Bytesize\n\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/zpatrick/go-bytesize/blob/master/LICENSE)\n[![Go Report Card](https://goreportcard.com/badge/github.com/zpatrick/go-bytesize)](https://goreportcard.com/report/github.com/zpatrick/go-bytesize)\n[![Go Doc](https://godoc.org/github.com/zpatrick/go-bytesize?status.svg)](https://godoc.org/github.com/zpatrick/go-bytesize)\n\n\n## Overview\nGo Bytesize is a utility package for working with common multiples of bytes in Go, such as: Bytes (B), Kilobytes (KB), Megabytes (MB), Gigabytes (GB), Terabytes (TB), Petabytes (PB), Exabytes (EB), Kibibytes (Kib), Mebibytes (MiB), Gibibytes (GiB), Tebibytes (TiB), Pebibytes (PiB), and Exbibytes (EiB).  \n\n## Example\n```\npackage main\n\nimport (\n        \"fmt\"\n        \"github.com/zpatrick/go-bytesize\"\n)\n\nfunc main() {\n        b := bytesize.Bytesize(10000)\n        fmt.Printf(\"%g bytes is: %g KB and %g MB\\n\", b, b.Kilobytes(), b.Megabytes())\n\n        b = bytesize.TB * 2\n        fmt.Printf(\"2 Terabytes is %g Gibibytes\\n\", b.Gibibytes())\n\n        b = bytesize.Bytesize(1000000)\n        fmt.Printf(\"%g bytes is %s\\n\", b, b.Format(\"mb\"))\n}\n```\n\nOutput:\n```\n10000 bytes is: 10 KB and 0.01 MB\n2 Terabytes is 1862.645149230957 Gibibytes\n1e+06 bytes is 1MB\n```\n\n## License\nThis work is published under the MIT license.\nPlease see the `LICENSE` file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzpatrick%2Fgo-bytesize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzpatrick%2Fgo-bytesize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzpatrick%2Fgo-bytesize/lists"}