{"id":44862268,"url":"https://github.com/carbocation/gotogether","last_synced_at":"2026-02-17T10:38:50.950Z","repository":{"id":8282508,"uuid":"9819187","full_name":"carbocation/gotogether","owner":"carbocation","description":"Tool permitting static assets to be attached to compiled go binaries, permitting single-file project deployment","archived":false,"fork":false,"pushed_at":"2013-05-02T18:05:37.000Z","size":109,"stargazers_count":22,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-19T02:58:09.586Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/carbocation.png","metadata":{"files":{"readme":"README.rst","changelog":"ChangeLog","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-02T18:02:55.000Z","updated_at":"2016-01-16T20:10:49.000Z","dependencies_parsed_at":"2022-08-07T01:01:06.661Z","dependency_job_id":null,"html_url":"https://github.com/carbocation/gotogether","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/carbocation/gotogether","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carbocation%2Fgotogether","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carbocation%2Fgotogether/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carbocation%2Fgotogether/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carbocation%2Fgotogether/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carbocation","download_url":"https://codeload.github.com/carbocation/gotogether/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carbocation%2Fgotogether/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29540247,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T08:11:05.436Z","status":"ssl_error","status_checked_at":"2026-02-17T08:09:38.860Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-02-17T10:38:50.239Z","updated_at":"2026-02-17T10:38:50.929Z","avatar_url":"https://github.com/carbocation.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"`gotogether` - Resource Compiler for Go\n=================================\n\n`gotogether`  a directory of resource into a Go source file so you can still\ndeploy a single executable as a web server with all the CSS, image files, JS ...\nincluded.\n\nThis is a fork of tebeka's nrsc: http://bitbucket.org/tebeka/nrsc\n\nInstalling\n==========\n::\n\n    go get github.com/carbocation/gotogether\n\nAlso grab the `gotogether` script from here_\n\nAnd you'll need `zip` somewhere in your path.\n\n.. _here: http://bit.ly/gotogether-script\n\nInvocation\n==========\n::\n\n    go build\n    gotogether \u003cexecutable\u003e \u003cresource dir\u003e [zip options]\n\n\nAPI\n===\nThe `gotogether` package has the following interface\n\n`gotogether.Handle(prefix string)`\n    This will register with the `net/http` module to handle all paths starting with prefix. \n\n    When a request is handled, `prefix` is stripped and then a resource is\n    located and served.\n\n    Resource that are not found will cause an HTTP 404 response.\n    \n\n`gotogether.Get(path string) Resource`\n    Will return a resource interface (or `nil` if not found) (see resource interface below).\n    This allows you more control on how to serve.\n\n\n`LoadTemplates(t *template.Template, filenames ...string) (*template.Template, error)`\n    Will load named templates from resources. If the argument \"t\" is `nil`, it is\n    created from the first resource.\n\nResource Interface\n------------------\n\n`func Open() (io.Reader, error)`\n    Returns a reader to resource data\n\n`func Size() int64`\n    Returns resource size (to be used with `Content-Length` HTTP header).\n\n`func ModTime() time.Time`\n    Returns modification time (to be used with `Last-Modified` HTTP header).\n\n\nExample Code\n------------\n::\n\n    package main\n\n    import (\n            \"fmt\"\n            \"net/http\"\n            \"os\"\n\n            \"github.com/carbocation/gotogether\"\n    )\n\n    func indexHandler(w http.ResponseWriter, req *http.Request) {\n            fmt.Fprintf(w, \"Hello World\\n\")\n    }\n\n    func main() {\n            gotogether.Handle(\"/static/\")\n            http.HandleFunc(\"/\", indexHandler)\n            if err := http.ListenAndServe(\":8080\", nil); err != nil {\n                    fmt.Fprintf(os.Stderr, \"error: %s\\n\", err)\n                    os.Exit(1)\n            }\n    }\n\nContact\n=======\nhttps://github.com/carbocation/gotogether\n    \nLicense\n=======\nMIT (see `LICENSE.txt`_)\n\n.. _`LICENSE.txt`: https://github.com/carbocation/gotogether/src/tip/LICENSE.txt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarbocation%2Fgotogether","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarbocation%2Fgotogether","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarbocation%2Fgotogether/lists"}