General Go template repository
This is a general template repository containing some basic files every GitHub repo owned by Giant Swarm should have.
Note also these more specific repositories:
Creating a new repository
Please do not use the Use this template
function in the GitHub web UI.
Check out the according handbook article for better instructions.
Setting up
You need to set the name in several places
go.mod
- change the name from crossplane-fn-template
to something reflective of your function
input/v1beta1/input.go
- change +groupName=template.fn.giantswarm.io
to something unique for your function
fn.go
- set composedName
to the name of your function (I normally use basename $module)
Building
When editing input
, do not forget to run go generate ./...
otherwise your input will be out of line.
Some suggestions for your README
After you have created your new repository, you may want to add some of these badges to the top of your README.
-
CircleCI: After enabling builds for this repo via this link, you can find badge code on this page.
-
Go reference: use this helper to create the markdown code.
-
Go report card: enter the module name on the front page and hit "Generate report". Then use this markdown code for your badge: [![Go report card](https://goreportcard.com/badge/github.com/giantswarm/REPOSITORY_NAME)](https://goreportcard.com/report/github.com/giantswarm/REPOSITORY_NAME)
-
Sourcegraph "used by N projects" badge: for public Go repos only: [![Sourcegraph](https://sourcegraph.com/github.com/giantswarm/REPOSITORY_NAME/-/badge.svg)](https://sourcegraph.com/github.com/giantswarm/REPOSITORY_NAME)