{"id":16306958,"url":"https://github.com/oalders/go-joined","last_synced_at":"2025-04-12T11:57:52.272Z","repository":{"id":57622511,"uuid":"394791214","full_name":"oalders/go-joined","owner":"oalders","description":"Golang library which provides functions for joining lists into natural language strings.","archived":false,"fork":false,"pushed_at":"2021-08-12T02:22:25.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-16T01:42:44.466Z","etag":null,"topics":["golang","join","strings"],"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/oalders.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-10T22:01:34.000Z","updated_at":"2022-05-17T17:14:35.000Z","dependencies_parsed_at":"2022-09-26T20:10:21.887Z","dependency_job_id":null,"html_url":"https://github.com/oalders/go-joined","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oalders%2Fgo-joined","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oalders%2Fgo-joined/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oalders%2Fgo-joined/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oalders%2Fgo-joined/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oalders","download_url":"https://codeload.github.com/oalders/go-joined/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248565078,"owners_count":21125415,"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","join","strings"],"created_at":"2024-10-10T21:12:05.788Z","updated_at":"2025-04-12T11:57:52.252Z","avatar_url":"https://github.com/oalders.png","language":"Go","readme":"# joined\n\nProvides functions for joining lists into natural language strings.\n\n## Functions\n\n### func [And](/joined.go#L8)\n\n`func And(list []string) string`\n\nAnd joins the last 2 elements of a list with \" and \", while joining\npreceding elements with a comma.\n\n```golang\n\nlist := []string{\"one\", \"two\"}\nfmt.Println(And(list)) // \"one and two\"\n\nlist = []string{\"one\", \"two\", \"three\"}\nfmt.Println(And(list)) // \"one, two and three\"\n\n```\n\n### func [Arbitrary](/joined.go#L22)\n\n`func Arbitrary(wordSeparator string, conjunction string, list []string) string`\n\nArbitrary joins the last 2 elements of a list with the supplied conjunction,\nwhile joining preceding elements with the supplied word separator.  Note\nthat you'll need to provide your own padding for both the word separator and\nthe conjunction.\n\n```golang\n\nlist := []string{\"eins\", \"zwei\", \"drei\"}\nfmt.Println(Arbitrary(\", \", \" und \", list)) // \"eins, zwei und drei\"\n\n```\n\n### func [Or](/joined.go#L14)\n\n`func Or(list []string) string`\n\nOr joins the last 2 elements of a list with \" or \", while joining\npreceding elements with a comma.\n\n```golang\n\nlist := []string{\"one\", \"two\"}\nfmt.Println(Or(list)) // \"one or two\"\n\nlist = []string{\"one\", \"two\", \"three\"}\nfmt.Println(Or(list)) // \"one, two or three\"\n\n```\n\n---\nReadme created from Go doc with [goreadme](https://github.com/posener/goreadme)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foalders%2Fgo-joined","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foalders%2Fgo-joined","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foalders%2Fgo-joined/lists"}