{"id":19144176,"url":"https://github.com/crossplane/function-template-go","last_synced_at":"2025-08-21T15:33:16.280Z","repository":{"id":195092744,"uuid":"691861675","full_name":"crossplane/function-template-go","owner":"crossplane","description":"A template for writing a composition function in Go","archived":false,"fork":false,"pushed_at":"2025-08-20T22:03:44.000Z","size":160,"stargazers_count":33,"open_issues_count":16,"forks_count":36,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-08-21T00:11:58.007Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://crossplane.io","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/crossplane.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-09-15T03:43:41.000Z","updated_at":"2025-07-07T08:30:09.000Z","dependencies_parsed_at":"2024-01-02T21:29:47.676Z","dependency_job_id":"653be1c0-b3a2-44a2-87bf-b1455be310b9","html_url":"https://github.com/crossplane/function-template-go","commit_stats":null,"previous_names":["crossplane/function-template-go"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/crossplane/function-template-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crossplane%2Ffunction-template-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crossplane%2Ffunction-template-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crossplane%2Ffunction-template-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crossplane%2Ffunction-template-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crossplane","download_url":"https://codeload.github.com/crossplane/function-template-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crossplane%2Ffunction-template-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271409931,"owners_count":24754733,"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-08-20T02:00:09.606Z","response_time":69,"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":[],"created_at":"2024-11-09T07:34:01.663Z","updated_at":"2025-08-21T15:33:15.968Z","avatar_url":"https://github.com/crossplane.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# function-template-go\n[![CI](https://github.com/crossplane/function-template-go/actions/workflows/ci.yml/badge.svg)](https://github.com/crossplane/function-template-go/actions/workflows/ci.yml)\n\nA template for writing a [composition function][functions] in [Go][go].\n\nTo learn how to use this template:\n\n* [Follow the guide to writing a composition function in Go][function guide]\n* [Learn about how composition functions work][functions]\n* [Read the function-sdk-go package documentation][package docs]\n\nIf you just want to jump in and get started:\n\n1. Replace `function-template-go` with your function in `go.mod`,\n   `package/crossplane.yaml`, and any Go imports. (You can also do this\n   automatically by running the `./init.sh \u003cfunction-name\u003e` script.)\n1. Update `input/v1beta1/` to reflect your desired input (and run `go generate ./...`)\n1. Add your logic to `RunFunction` in `fn.go`\n1. Add tests for your logic in `fn_test.go`\n1. Update this file, `README.md`, to be about your function!\n\nThis template uses [Go][go], [Docker][docker], and the [Crossplane CLI][cli] to\nbuild functions.\n\n```shell\n# Run code generation - see input/generate.go\n$ go generate ./...\n\n# Run tests - see fn_test.go\n$ go test ./...\n\n# Build the function's runtime image - see Dockerfile\n$ docker build . --tag=runtime\n\n# Build a function package - see package/crossplane.yaml\n$ crossplane xpkg build -f package --embed-runtime-image=runtime\n```\n\n[functions]: https://docs.crossplane.io/latest/concepts/composition-functions\n[go]: https://go.dev\n[function guide]: https://docs.crossplane.io/knowledge-base/guides/write-a-composition-function-in-go\n[package docs]: https://pkg.go.dev/github.com/crossplane/function-sdk-go\n[docker]: https://www.docker.com\n[cli]: https://docs.crossplane.io/latest/cli\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrossplane%2Ffunction-template-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrossplane%2Ffunction-template-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrossplane%2Ffunction-template-go/lists"}