{"id":36445475,"url":"https://github.com/akmittal/turbo-go","last_synced_at":"2026-01-11T22:07:45.357Z","repository":{"id":54618372,"uuid":"336246905","full_name":"akmittal/turbo-go","owner":"akmittal","description":"Build hotwire apps using go","archived":false,"fork":false,"pushed_at":"2021-02-08T06:01:36.000Z","size":15,"stargazers_count":40,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-06-19T04:24:58.599Z","etag":null,"topics":["go-template","golang","hotwire","hotwire-turbo"],"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/akmittal.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-05T11:04:48.000Z","updated_at":"2024-05-13T17:35:05.000Z","dependencies_parsed_at":"2022-08-13T21:40:54.072Z","dependency_job_id":null,"html_url":"https://github.com/akmittal/turbo-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/akmittal/turbo-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akmittal%2Fturbo-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akmittal%2Fturbo-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akmittal%2Fturbo-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akmittal%2Fturbo-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akmittal","download_url":"https://codeload.github.com/akmittal/turbo-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akmittal%2Fturbo-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28325033,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T18:42:50.174Z","status":"ssl_error","status_checked_at":"2026-01-11T18:39:13.842Z","response_time":60,"last_error":"SSL_read: 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":["go-template","golang","hotwire","hotwire-turbo"],"created_at":"2026-01-11T22:07:44.819Z","updated_at":"2026-01-11T22:07:45.350Z","avatar_url":"https://github.com/akmittal.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Turbo-go\n\nBuild hotwire applications using Go\n\n\n\n## Example\nExamples are in [examples](http://github.com/akmittal/turbo-go/tree/master/examples) directory\n\n## Install turbo-go\n``` text\ngo get github.com/akmittal/turbo-go\n```\n\n## API\n```github.com/akmittal/turbo-go/pkg/turbo```\n\nSend single template update\n``` go\nmessageTemp, err := template.New(\"message\").parse(`\u003cdiv\u003e{{.}}\u003c/div\u003e`)\ndata := time.Now()\nturbo := turbo.Turbo{\n\t\tAction:   turbo.APPEND, // Action can be UPDATE, APPEND, PREPEND, REPLACE, REMOVE\n\t\tTemplate: messageTemp,\n\t\tTarget:   \"messages\",\n\t\tData:     data,\n\t}\n```\n\nSend stream of templates \n\n``` go \nfunc main(){\n\t// Create hub\n    hub := turbo.NewHub()\n    go hub.Run()\n    mux.Get(\"/socket\", func(rw http.ResponseWriter, req *http.Request) {\n\t\tgetSocket(msgChan, hub, rw, req)\n\t})\n}\n\nfunc getSocket(msgChan chan interface{}, hub *turbo.Hub, rw http.ResponseWriter, req *http.Request) {\n\ttemp, _ := template.ParseFiles(\"templates/messages.temp.html\")\n\tmessageTemp := temp.Lookup(\"message\")\n\n\tappendMessage := turbo.Stream{\n\t\tAction:   turbo.APPEND,\n\t\tTemplate: messageTemp,\n\t\tTarget:   \"messages\",\n\t\tData:     msgChan,\n\t}\n\n\tappendMessage.Stream(hub, rw, req)\n}\n\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakmittal%2Fturbo-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakmittal%2Fturbo-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakmittal%2Fturbo-go/lists"}