{"id":19163146,"url":"https://github.com/flazz/togo","last_synced_at":"2025-06-22T03:33:55.871Z","repository":{"id":57485814,"uuid":"85587325","full_name":"flazz/togo","owner":"flazz","description":"convert any file to Go source","archived":false,"fork":false,"pushed_at":"2017-03-20T14:55:12.000Z","size":56,"stargazers_count":12,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T11:39:43.824Z","etag":null,"topics":["byte","file","generator","golang","tool"],"latest_commit_sha":null,"homepage":null,"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/flazz.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":"2017-03-20T14:33:13.000Z","updated_at":"2024-05-21T03:33:33.000Z","dependencies_parsed_at":"2022-09-10T16:32:20.987Z","dependency_job_id":null,"html_url":"https://github.com/flazz/togo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/flazz/togo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flazz%2Ftogo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flazz%2Ftogo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flazz%2Ftogo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flazz%2Ftogo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flazz","download_url":"https://codeload.github.com/flazz/togo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flazz%2Ftogo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261231425,"owners_count":23127998,"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":["byte","file","generator","golang","tool"],"created_at":"2024-11-09T09:14:18.819Z","updated_at":"2025-06-22T03:33:50.854Z","avatar_url":"https://github.com/flazz.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# togo – convert any file to .go source\n\nGenerates a Go source file with a []byte var containing the given file's\ncontents.\n\nAllows files to to be compiled (and linked) into a pkg. Quite handy for use\nwith [go generate](https://blog.golang.org/generate).\n\n## Example:\n\nGiven some file `foo.txt`\n```{.sh}\n% echo \"hello world\" \u003efoo.txt\n```\n\nConvert it via *togo*\n```{.sh}\n% togo -pkg bar -name foo -input ./foo.txt\n```\n\nA new file is created: `foo.txt.go`\n```{.sh}\n% ls foo.txt*\nfoo.txt\nfoo.txt.go\n```\n\nWith a var inside\n```{.sh}\n% cat foo.txt.go\npackage bar\n\nvar foo = []byte{\n\t// 12 bytes from ./foo.txt\n\t0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x0a,\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflazz%2Ftogo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflazz%2Ftogo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflazz%2Ftogo/lists"}