{"id":15393865,"url":"https://github.com/mitchellh/prefixedio","last_synced_at":"2025-07-05T09:37:19.534Z","repository":{"id":17794793,"uuid":"20674949","full_name":"mitchellh/prefixedio","owner":"mitchellh","description":"Golang library that demultiplexes line-oriented data from an io.Reader into multiple io.Readers based on a prefix.","archived":false,"fork":false,"pushed_at":"2019-02-13T21:39:02.000Z","size":11,"stargazers_count":45,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T05:59:26.138Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mitchellh.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":"2014-06-10T06:29:49.000Z","updated_at":"2024-11-09T20:34:45.000Z","dependencies_parsed_at":"2022-09-10T14:22:51.827Z","dependency_job_id":null,"html_url":"https://github.com/mitchellh/prefixedio","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/mitchellh%2Fprefixedio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchellh%2Fprefixedio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchellh%2Fprefixedio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchellh%2Fprefixedio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitchellh","download_url":"https://codeload.github.com/mitchellh/prefixedio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670282,"owners_count":21142895,"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-01T15:20:37.255Z","updated_at":"2025-04-13T05:30:44.832Z","avatar_url":"https://github.com/mitchellh.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# prefixedio\n\n`prefixedio` (Golang package: `prefixedio`) is a package for Go\nthat takes an `io.Reader` and de-multiplexes line-oriented data based\non a line prefix to a set of readers.\n\n## Installation and Usage\n\nInstall using `go get github.com/mitchellh/prefixedio`.\n\nFull documentation is available at\nhttp://godoc.org/github.com/mitchellh/prefixedio\n\nBelow is an example of its usage ignoring errors:\n\n```go\n// Assume r is some set io.Reader. Perhaps a file, network, anything.\nvar r io.Reader\n\n// Initialize the prefixed reader\npr, _ := prefixedio.NewReader(r)\n\n// Grab readers for a couple prefixes\nerrR, _ := pr.Prefix(\"err: \")\noutR, _ := pr.Prefix(\"out: \")\n\n// Copy the data to different places based on the prefix\ngo io.Copy(os.Stderr, errR)\ngo io.Copy(os.Stdout, outR)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitchellh%2Fprefixedio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitchellh%2Fprefixedio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitchellh%2Fprefixedio/lists"}