{"id":17438615,"url":"https://github.com/blixt/go-pher","last_synced_at":"2026-01-22T14:59:54.424Z","repository":{"id":11401626,"uuid":"13848384","full_name":"blixt/go-pher","owner":"blixt","description":"The PHP of Go.","archived":false,"fork":false,"pushed_at":"2014-04-21T16:32:31.000Z","size":176,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T15:58:40.027Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blixt.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":"2013-10-25T01:04:33.000Z","updated_at":"2016-10-14T14:28:12.000Z","dependencies_parsed_at":"2022-09-22T22:51:38.643Z","dependency_job_id":null,"html_url":"https://github.com/blixt/go-pher","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/blixt/go-pher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blixt%2Fgo-pher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blixt%2Fgo-pher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blixt%2Fgo-pher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blixt%2Fgo-pher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blixt","download_url":"https://codeload.github.com/blixt/go-pher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blixt%2Fgo-pher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28664827,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T14:01:31.714Z","status":"ssl_error","status_checked_at":"2026-01-22T13:59:23.143Z","response_time":144,"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":"2024-10-17T12:38:34.610Z","updated_at":"2026-01-22T14:59:54.405Z","avatar_url":"https://github.com/blixt.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Pher /fə(ɹ)/\n=============\n\nDisclaimer: Most of this code was written while inebriated.\n\nThis program basically takes an input `.gopher` file (HTML mixed\nwith Go code in `\u003c? … ?\u003e` statements) and outputs a Go program.\n\n\nSet up\n------\n\nTo set it up, just install this package:\n\n```bash\ngo get github.com/blixt/go-pher\n```\n\n\nExample\n-------\n\nTo run the example:\n\n```bash\n# Convert the .gopher file to a .go file\ngo run main.go -i example.gopher \u003e example.go\n# Build the .go file into a cgi-bin directory\nmkdir cgi-bin\ngo build -o cgi-bin/example example.go\n# Start up a CGI server (Python makes it easy)\npython -m CGIHTTPServer\n# Open the page!\nopen http://localhost:8000/cgi-bin/example?name=world\n```\n\nSee below for the resulting contents of each file.\n\n### example.gopher\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n\t\u003ctitle\u003eTest\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\u003c?\nfunc greet(name string) string{\n  return \"what up, \" + name\n}\n?\u003e\n\t\u003ch1\u003e\u003c?= greet(pher.Get(\"name\")) ?\u003e\u003c/h1\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n### example.go\n\n```go\npackage main\nimport (\n\"fmt\"\n\"github.com/blixt/go-pher/pher\"\n)\nfunc greet(name string) string{\n  return \"what up, \" + name\n}\nfunc main() {\nfmt.Print(\"Content-Type: text/html\\r\\n\\r\\n\")\nfmt.Print(\"\u003c!DOCTYPE html\u003e\\n\u003chtml\u003e\\n\u003chead\u003e\\n\\t\u003ctitle\u003eTest\u003c/title\u003e\\n\u003c/head\u003e\\n\u003cbody\u003e\\n\")\nfmt.Print(\"\\t\u003ch1\u003e\")\nfmt.Print(greet(pher.Get(\"name\")))\nfmt.Print(\"\u003c/h1\u003e\\n\u003c/body\u003e\\n\u003c/html\u003e\\n\")\n}\n```\n\n### Output HTML\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n\t\u003ctitle\u003eTest\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\t\u003ch1\u003ewhat up, world\u003c/h1\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblixt%2Fgo-pher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblixt%2Fgo-pher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblixt%2Fgo-pher/lists"}