{"id":38237206,"url":"https://github.com/lnashier/goarc","last_synced_at":"2026-01-17T01:07:21.796Z","repository":{"id":225039943,"uuid":"764919480","full_name":"lnashier/goarc","owner":"lnashier","description":"Idiomatic Go Applications Framework","archived":false,"fork":false,"pushed_at":"2025-03-05T00:34:27.000Z","size":160,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T01:26:34.437Z","etag":null,"topics":["framework","golang","server"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lnashier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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-02-29T00:14:39.000Z","updated_at":"2025-03-05T00:30:09.000Z","dependencies_parsed_at":"2024-03-17T23:28:09.890Z","dependency_job_id":"cfd86985-7628-40ec-809a-4f65d6f09784","html_url":"https://github.com/lnashier/goarc","commit_stats":null,"previous_names":["lnashier/go-app"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/lnashier/goarc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnashier%2Fgoarc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnashier%2Fgoarc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnashier%2Fgoarc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnashier%2Fgoarc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lnashier","download_url":"https://codeload.github.com/lnashier/goarc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnashier%2Fgoarc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28490988,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T00:50:05.742Z","status":"ssl_error","status_checked_at":"2026-01-17T00:43:11.982Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["framework","golang","server"],"created_at":"2026-01-17T01:07:21.041Z","updated_at":"2026-01-17T01:07:21.789Z","avatar_url":"https://github.com/lnashier.png","language":"Go","readme":"# Idiomatic Go Applications Framework\n\n[![GoDoc](https://pkg.go.dev/badge/github.com/lnashier/goarc)](https://pkg.go.dev/github.com/lnashier/goarc)\n[![Go Report Card](https://goreportcard.com/badge/github.com/lnashier/goarc)](https://goreportcard.com/report/github.com/lnashier/goarc)\n\nThe goarc is an idiomatic Go applications framework that focuses on application Life-Cycle.\n\n## Installation\n\nSimply add the following import to your code, and then `go [build|run|test]` will automatically fetch the necessary\ndependencies:\n\n```\nimport \"github.com/lnashier/goarc\"\n```\n\n## Examples\n\n[Examples](examples/)\n\n## Toy HTTP Example\n\n```\npackage main\n\nimport (\n\t\"github.com/lnashier/goarc\"\n\tgoarchttp \"github.com/lnashier/goarc/http\"\n\txhttp \"github.com/lnashier/goarc/x/http\"\n\t\"net/http\"\n\t\"time\"\n)\n\nfunc main() {\n\tgoarc.Up(goarchttp.NewService(\n\t\tgoarchttp.ServiceName(\"toy\"),\n\t\tgoarchttp.ServicePort(8080),\n\t\tgoarchttp.ServiceShutdownGracetime(2*time.Second),\n\t\tgoarchttp.App(func(srv *goarchttp.Service) error {\n\n\t\t\t// BYO http.Handler\n\t\t\tsrv.Register(\"/toys/byo\", http.MethodGet, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\t\t\tw.WriteHeader(http.StatusOK)\n\t\t\t\tw.Write([]byte(\"Hello World!\"))\n\t\t\t}))\n\n\t\t\t// Use pre-assembled http.Handler to work with JSON response type\n\t\t\tsrv.Register(\"/toys/json\", http.MethodGet, xhttp.JSONHandler(func(r *http.Request) (any, error) {\n\t\t\t\treturn []string{\"Hello World!\"}, nil\n\t\t\t}))\n\n\t\t\t// Use pre-assembled http.Handler to work with TEXT response type\n\t\t\tsrv.Register(\"/toys/text\", http.MethodGet, xhttp.TextHandler(func(r *http.Request) (string, error) {\n\t\t\t\treturn \"Hello World!\", nil\n\t\t\t}))\n\n\t\t\treturn nil\n\t\t}),\n\t))\n}\n```\n\n\n## Toy CLI Example\n\n```\npackage main\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"github.com/lnashier/goarc\"\n\tgoarccli \"github.com/lnashier/goarc/cli\"\n\txtime \"github.com/lnashier/goarc/x/time\"\n\t\"time\"\n)\n\nfunc main() {\n\tgoarc.Up(goarccli.NewService(\n\t\tgoarccli.ServiceName(\"mockcli\"),\n\t\tgoarccli.App(\n\t\t\tfunc(svc *goarccli.Service) error {\n\t\t\t\tsvc.Register(\"echo\", func(ctx context.Context, args []string) error {\n\t\t\t\t\txtime.SleepWithContext(ctx, time.Duration(10)*time.Second)\n\n\t\t\t\t\tif len(args) \u003e 0 {\n\t\t\t\t\t\tfmt.Println(args[0])\n\t\t\t\t\t\treturn nil\n\t\t\t\t\t}\n\n\t\t\t\t\treturn errors.New(\"nothing to echo\")\n\t\t\t\t})\n\n\t\t\t\treturn nil\n\t\t\t},\n\t\t),\n\t))\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flnashier%2Fgoarc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flnashier%2Fgoarc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flnashier%2Fgoarc/lists"}