{"id":20459761,"url":"https://github.com/rosbit/multipart-creator","last_synced_at":"2026-04-16T23:02:05.487Z","repository":{"id":57544535,"uuid":"297005318","full_name":"rosbit/multipart-creator","owner":"rosbit","description":"A utility to create multipart content that could be used as body of an HTTP POST request or email","archived":false,"fork":false,"pushed_at":"2021-05-09T06:47:46.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-16T00:24:46.870Z","etag":null,"topics":["email","http-post-body","multipart"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rosbit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-20T05:00:29.000Z","updated_at":"2021-05-09T06:46:59.000Z","dependencies_parsed_at":"2022-08-27T05:13:21.535Z","dependency_job_id":null,"html_url":"https://github.com/rosbit/multipart-creator","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/rosbit%2Fmultipart-creator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosbit%2Fmultipart-creator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosbit%2Fmultipart-creator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosbit%2Fmultipart-creator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rosbit","download_url":"https://codeload.github.com/rosbit/multipart-creator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242014722,"owners_count":20057880,"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":["email","http-post-body","multipart"],"created_at":"2024-11-15T12:17:12.486Z","updated_at":"2025-12-04T01:08:37.033Z","avatar_url":"https://github.com/rosbit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# multipart creator\n\nUtility to create the mulitpart content that could be used as the body of an HTTP POST request or email.\n\n### Usage\n\nThis package is fully go-getable. So just type `go get github.com/rosbit/multipart-creator` to install.\n\n```go\npackage main\n\nimport (\n\t\"github.com/rosbit/multipart-creator\"\n\t\"fmt\"\n\t\"os\"\n\t\"bytes\"\n)\n\nfunc main() {\n\t// sample 1:\n\tparams := []multipart.Param{\n\t\tmultipart.Param{\"name\", \"rosbit\", nil},\n\t\tmultipart.Param{\"age\", 10, nil},\n\t\tmultipart.Param{\"file\", \"this/is/filename\", bytes.NewBuffer([]byte(\"the content of filename\"))},\n\t}\n\n\tcontentType, err := multipart.Create(os.Stdout, \"\", params)\n\n\t// sample 2:\n\tcontentType, err := multipart.CreateMultiPart(os.Stdout, \"-- this is my boundary --\",\n\t\tmultipart.KeyVal(\"name\", \"rosbit\"),\n\t\tmultipart.KeyVal(\"age\", 10),\n\t\tmultipart.Reader(\"file\", \"file/name\", bytes.NewBuffer([]byte(\"the content of optional file name\"))),\n\t)\n\n\t// output result\n\tif err != nil {\n\t\tfmt.Printf(\"failed to create multipart: %v\\n\", err)\n\t\treturn\n\t}\n\tfmt.Printf(\"Content-Type: %s\\n\", contentType)\n}\n```\n\n### Status\n\nThe package is fully tested, so be happy to use it.\n\n### Contribution\n\nPull requests are welcome! Also, if you want to discuss something send a pull request with proposal and changes.\n__Convention:__ fork the repository and make changes on your fork in a feature branch.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frosbit%2Fmultipart-creator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frosbit%2Fmultipart-creator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frosbit%2Fmultipart-creator/lists"}