{"id":22423430,"url":"https://github.com/prantlf/go-sizeio","last_synced_at":"2025-06-14T15:39:35.298Z","repository":{"id":144226669,"uuid":"312561793","full_name":"prantlf/go-sizeio","owner":"prantlf","description":"Extends readers with an additional method Size returning the size of the reader content.","archived":false,"fork":false,"pushed_at":"2022-01-29T12:51:30.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T10:43:04.883Z","etag":null,"topics":["go","go-module","go-package","reader","size"],"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/prantlf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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}},"created_at":"2020-11-13T11:51:28.000Z","updated_at":"2023-03-19T18:46:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"0951ef6f-3aa9-4654-8931-38b9ac757078","html_url":"https://github.com/prantlf/go-sizeio","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fgo-sizeio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fgo-sizeio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fgo-sizeio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fgo-sizeio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prantlf","download_url":"https://codeload.github.com/prantlf/go-sizeio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245791899,"owners_count":20672668,"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":["go","go-module","go-package","reader","size"],"created_at":"2024-12-05T18:11:18.530Z","updated_at":"2025-03-27T05:41:02.692Z","avatar_url":"https://github.com/prantlf.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-sizeio\n\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/prantlf/go-sizeio)](https://pkg.go.dev/github.com/prantlf/go-sizeio)\n[![Test Status](https://github.com/prantlf/go-sizeio/workflows/Test/badge.svg)](https://github.com/prantlf/go-sizeio/actions)\n[![codecov](https://codecov.io/gh/prantlf/go-sizeio/branch/master/graph/badge.svg?token=XS0COPSRR7)](https://codecov.io/gh/prantlf/go-sizeio)\n\nExtends [readers] with an additional method [Size] returning the size of the reader content. See the [documentation] for more information.\n\n## Installation\n\nAdd this package to `go.mod` and `go.sub` in your Go project:\n\n    go get github.com/prantlf/go-sizeio\n\n## Usage\n\nUse convenience methods to create readers with the extra `Size` method:\n\n```go\nimport \"github.com/prantlf/go-sizeio\"\n// get a file reader/closer with the size available right away\nreaderWithSize := sizeio.OpenFile(\"...\")\n// get a general reader with the size known ahead\nreaderWithSize := sizeio.SizeReader(otherReader, 456)\n// test any reader whether it supports the Size method\n_, ok := someReader.(sizeio.WithSize)\n// get the size of the reader content\nsize := readerWithSize.Size() // returns 456 as in64\n```\n\nSee the [documentation] for the full interface.\n\n[readers]: https://golang.org/pkg/io/#Reader\n[Size]: https://pkg.go.dev/github.com/prantlf/go-sizeio/#WithSize\n[documentation]: https://pkg.go.dev/github.com/prantlf/go-sizeio#section-documentation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprantlf%2Fgo-sizeio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprantlf%2Fgo-sizeio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprantlf%2Fgo-sizeio/lists"}