{"id":19010058,"url":"https://github.com/michaelcharles/serverless-go-build-extended","last_synced_at":"2025-09-06T13:32:58.775Z","repository":{"id":57153509,"uuid":"346270374","full_name":"MichaelCharles/serverless-go-build-extended","owner":"MichaelCharles","description":"An extended version of Sean Keenan's serverless-go-build plugin.","archived":false,"fork":false,"pushed_at":"2021-05-13T04:45:50.000Z","size":34,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-30T19:52:54.205Z","etag":null,"topics":["go","golang","serverless","serverless-framework"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/MichaelCharles.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","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-03-10T07:32:27.000Z","updated_at":"2024-11-17T21:27:44.000Z","dependencies_parsed_at":"2022-09-07T08:40:54.494Z","dependency_job_id":null,"html_url":"https://github.com/MichaelCharles/serverless-go-build-extended","commit_stats":null,"previous_names":["mcaubrey/serverless-go-build-extended"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MichaelCharles/serverless-go-build-extended","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelCharles%2Fserverless-go-build-extended","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelCharles%2Fserverless-go-build-extended/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelCharles%2Fserverless-go-build-extended/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelCharles%2Fserverless-go-build-extended/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MichaelCharles","download_url":"https://codeload.github.com/MichaelCharles/serverless-go-build-extended/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelCharles%2Fserverless-go-build-extended/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273912614,"owners_count":25189969,"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","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","golang","serverless","serverless-framework"],"created_at":"2024-11-08T19:09:45.623Z","updated_at":"2025-09-06T13:32:58.493Z","avatar_url":"https://github.com/MichaelCharles.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serverless Go Build Extended (For Compatibility with Serverless Offline)\n\nForked from [Sean Keenan](https://github.com/sean9keenan)'s super helpful [serverless-go-build](https://github.com/sean9keenan/serverless-go-build) repository.\n\nThis version of the repository has an additional configuration option, `useBinPathForHandler`.\n\n```\ncustom:\n  go-build:\n    useBinPathForHandler: true\nfunctions:\n  getWidget:\n    handler: bin/entrypoints/widget/main\n    events:\n      - http:\n          path: widget\n          method: get\n```\n\nWhen `useBinPathForHandler` is set to `true`, the plugin will assume that the path set in your functions section of the `serverless.yml` file refers to the resulting build location, and *not* the source Go file.\n\nIf you set your handler to `bin/hello/main`, it will assume that the source Go file is at `hello/main.go`.\n\nYou can set `binPath` to a custom folder name. However, you must also make sure to use that folder name in the handler name if used in conjunction with `useBinPathForHandler`.\n\n```\ncustom:\n  go-build:\n    useBinPathForHandler: true\n    binPath: compiled\nfunctions:\n  getWidget:\n    handler: compiled/entrypoints/widget/main\n    events:\n      - http:\n          path: widget\n          method: get\n```\n\nThe above will look for a Go file at `entrypoints/widget/main.go`, and then compile it to `compiled/entrypoints/widget/main`.\n\n## But why though?\n\nOther plugins such as `serverless-offline` require that the handler of a function point at the actual binary that needs to be run. The default configuration of `serverless-go-build` requires you to write the source Go file as the function handler. The use of the new `useBinPathForHandler` option allows the handler to be set to point at the compiled file as usual, making it possible to use plugins such as `serverless-offline`. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelcharles%2Fserverless-go-build-extended","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelcharles%2Fserverless-go-build-extended","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelcharles%2Fserverless-go-build-extended/lists"}