---
title: Go Buildpack
owner: Buildpacks
---

<strong><%= modified_date %></strong>

## <a id='buildpack'></a>About the Go Buildpack ##

For information about using and extending the Go buildpack in Cloud Foundry, see
the [go-buildpack GitHub repo](https://github.com/cloudfoundry/go-buildpack).

You can find current information about this buildpack on the Go buildpack
[release page](https://github.com/cloudfoundry/go-buildpack/releases) in GitHub.

### Specifying a Go version

#### with Godeps

The Go version is saved in `Godeps.json` with the command `godep save`.

---
title: Go Buildpack
owner: Buildpacks
---

<strong><%= modified_date %></strong>

## <a id='buildpack'></a>Using the Go Buildpack ##

This buildpack will get used if you have any files with the `.go` extension in your repository, or you request the buildpack with

```bash
cf push my_app -b go_buildpack
```

If your Cloud Foundry deployment does not have the Go Buildpack installed, or the installed version is out of date, you can use the latest version with the command:

```bash
cf push my_app -b https://github.com/cloudfoundry/go-buildpack.git
```

When pushing go apps, you must specify a start command for the app. The start command can be placed in the file `Procfile` in your app's root directory, for example:

```
web: my-go-server
```

if the binary generated by your go project is `my-go-server`. You can also specify your app's start command in the `manifest.yml` file in the root directory, for example:

```yaml
---
application
  - name: my-app-name
    command: my-go-server
```

Finally, make sure that you have packaged your dependencies using the [Godep](https://github.com/tools/godep) dependency packager. Cloud Foundry requires a valid `Godeps/Godeps.json` file in the root directory for your app to deploy. For further help, please see these fixture apps for examples of valid go applications you can deploy:

* [go app](https://github.com/cloudfoundry/go-buildpack/tree/master/cf_spec/fixtures/go_app/src/go_app)
* [go app with dependencies](https://github.com/cloudfoundry/go-buildpack/tree/master/cf_spec/fixtures/go_app_with_dependencies/src/go_app_with_dependencies)


For more information about using and extending the Go buildpack in Cloud Foundry, see
the [go-buildpack GitHub repo](https://github.com/cloudfoundry/go-buildpack).

You can find current information about this buildpack on the Go buildpack
[release page](https://github.com/cloudfoundry/go-buildpack/releases) in GitHub.

### Specifying a Go version

#### with Godeps

The Go version is saved in `Godeps.json` with the command `godep save`.

Improve documentation for the Go Buildpack
Improve documentation for the Go Buildpack

[#115740799]

- Closes cloudfoundry/go-buildpack#33

Signed-off-by: David Jahn <ea2208fe99a56ed20c9ae20b0a1446b61f13a269@gmail.com>
