{"id":13413968,"url":"https://github.com/Wing924/ltsv","last_synced_at":"2025-03-14T20:30:49.480Z","repository":{"id":57492101,"uuid":"186218618","full_name":"Wing924/ltsv","owner":"Wing924","description":"High performance LTSV (Labeled Tab Separeted Value) reader for Go.","archived":false,"fork":false,"pushed_at":"2024-09-27T07:41:17.000Z","size":28,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T06:46:28.837Z","etag":null,"topics":["golang","ltsv","ltsv-format"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Wing924.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":"2019-05-12T06:11:04.000Z","updated_at":"2024-09-27T07:39:54.000Z","dependencies_parsed_at":"2022-08-28T11:50:34.982Z","dependency_job_id":null,"html_url":"https://github.com/Wing924/ltsv","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wing924%2Fltsv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wing924%2Fltsv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wing924%2Fltsv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wing924%2Fltsv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wing924","download_url":"https://codeload.github.com/Wing924/ltsv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243642012,"owners_count":20323949,"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":["golang","ltsv","ltsv-format"],"created_at":"2024-07-30T20:01:54.018Z","updated_at":"2025-03-14T20:30:49.201Z","avatar_url":"https://github.com/Wing924.png","language":"Go","funding_links":[],"categories":["Text Processing","Template Engines","Specific Formats","文本处理","文本处理`解析和操作文本的代码库`","Go","Bot Building"],"sub_categories":["Parsers/Encoders/Decoders","解析 器/Encoders/Decoders","HTTP Clients","查询语"],"readme":"# ltsv\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Build Status](https://travis-ci.com/Wing924/ltsv.svg?branch=master)](https://travis-ci.com/Wing924/ltsv)\n[![Go Report Card](https://goreportcard.com/badge/github.com/Wing924/ltsv)](https://goreportcard.com/report/github.com/Wing924/ltsv)\n[![codecov](https://codecov.io/gh/Wing924/ltsv/branch/master/graph/badge.svg)](https://codecov.io/gh/Wing924/ltsv)\n[![GoDoc](https://godoc.org/github.com/Wing924/ltsv?status.svg)](https://godoc.org/github.com/Wing924/ltsv)\n\nHigh performance LTSV (Labeled Tab Separeted Value) parser for Go.\n\nAbout LTSV: http://ltsv.org/\n\n\tLabeled Tab-separated Values (LTSV) format is a variant of \n\tTab-separated Values (TSV). Each record in a LTSV file is represented \n\tas a single line. Each field is separated by TAB and has a label and\n\t a value. The label and the value have been separated by ':'. With \n\tthe LTSV format, you can parse each line by spliting with TAB (like \n\toriginal TSV format) easily, and extend any fields with unique labels \n\tin no particular order.\n\n## Installation\n\n```bash\ngo get github.com/Wing924/ltsv\n```\n\n## Examples\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/Wing924/ltsv\"\n)\n\nfunc main() {\n\tline := []byte(\"foo:123\\tbar:456\")\n    record, err := ltsv.ParseLineAsMap(line, nil)\n    if err != nil {\n        panic(err)\n    }\n    fmt.Printf(\"%#v\", record) // map[string]string{\"foo\":\"123\", \"bar\":\"456\"}\n}\n```\n\n## Benchmarks\n\nBenchmark against \n* [Songmu/go-ltsv](https://github.com/Songmu/go-ltsv): 635% faster\n* [ymotongpoo/goltsv](https://github.com/ymotongpoo/goltsv): 365% faster\n* [najeira/ltsv](https://github.com/najeira/ltsv): 782% faster\n\nSource code: [bench/line_test.go](https://github.com/Wing924/ltsv/blob/master/bench/line_test.go).\n\n### Result\n\n```\n$ go test -bench . -benchmem\ngoos: darwin\ngoarch: amd64\npkg: github.com/Wing924/ltsv/bench\nBenchmark_line_Wing924_ltsv-4          \t 2000000\t       626 ns/op\t     224 B/op\t      17 allocs/op\nBenchmark_line_Wing924_ltsv_strict-4   \t 2000000\t       788 ns/op\t     224 B/op\t      17 allocs/op\nBenchmark_line_Songmu_goltsv-4         \t  300000\t      3975 ns/op\t    1841 B/op\t      32 allocs/op\nBenchmark_line_ymotongpoo_goltsv-4     \t  500000\t      2286 ns/op\t    5793 B/op\t      17 allocs/op\nBenchmark_line_najeira_ltsv-4          \t  300000\t      4896 ns/op\t    5529 B/op\t      26 allocs/op\nPASS\nok  \tgithub.com/Wing924/ltsv/bench\t8.245s\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWing924%2Fltsv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FWing924%2Fltsv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWing924%2Fltsv/lists"}