{"id":21473592,"url":"https://github.com/lucasepe/file2go","last_synced_at":"2025-03-17T07:26:11.916Z","repository":{"id":242101028,"uuid":"808686632","full_name":"lucasepe/file2go","owner":"lucasepe","description":"Convert any file to Go source.","archived":false,"fork":false,"pushed_at":"2024-05-31T15:49:39.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-09T14:36:38.239Z","etag":null,"topics":["command-line","embed","golang","resources","tool"],"latest_commit_sha":null,"homepage":"https://github.com/lucasepe/file2go","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/lucasepe.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-31T15:40:09.000Z","updated_at":"2024-09-09T15:03:28.000Z","dependencies_parsed_at":"2024-05-31T17:30:41.766Z","dependency_job_id":"4cc59f34-695b-4f62-9a76-1306dff92eb8","html_url":"https://github.com/lucasepe/file2go","commit_stats":null,"previous_names":["lucasepe/file2go"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasepe%2Ffile2go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasepe%2Ffile2go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasepe%2Ffile2go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasepe%2Ffile2go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucasepe","download_url":"https://codeload.github.com/lucasepe/file2go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243990429,"owners_count":20379795,"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":["command-line","embed","golang","resources","tool"],"created_at":"2024-11-23T10:17:54.399Z","updated_at":"2025-03-17T07:26:11.890Z","avatar_url":"https://github.com/lucasepe.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# file2go\n\n\n```txt\n┌─┐┬ ┬  ┌─┐   ┌─┐┌─┐\n├┤ │ │  ├┤    │ ┬│ │\n└  ┴ ┴─┘└─┘ 2 └─┘└─┘\nhttps://github.com/lucasepe/file2go\n\nConvert any file to Go source.\n\nSYNOPSIS:\n\n  file2go [string] [string]\n\nDESCRIPTION:\n\nThe file2go utility reads a file from stdin and writes it to stdout,\nconverting each byte to its hex representation on the fly.\n\n  * if the first [string] is present, it is printed before the data\n  * if the second [string] is present, it is printed after the data\n\nThis program is used to embed binary or other files into Go source\nfiles, for instance as a []byte.\n\nEXAMPLES:\n\n  date | file2go 'var myDate = []byte {' '}'\n\nwill produce:\n\n  var myDate = []byte {\n      0x46, 0x72, 0x69, 0x20, 0x4d, 0x61, 0x79, 0x20, 0x33, 0x31,\n      0x20, 0x31, 0x37, 0x3a, 0x31, 0x38, 0x3a, 0x34, 0x38, 0x20,\n      0x43, 0x45, 0x53, 0x54, 0x20, 0x32, 0x30, 0x32, 0x34, 0x0a\n  }\n```\n\n\u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\n---\n\nI know very well about the go [package embed](https://pkg.go.dev/embed), but I wanted something _'old school'_.\n\nIf your workflow involves embedding multiple files, regenerating frequently your embedded data, then you definitely have to choose the [embed](https://pkg.go.dev/embed) package.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasepe%2Ffile2go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucasepe%2Ffile2go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasepe%2Ffile2go/lists"}