<commit_before># Heroku Buildpack: Go

This is the [Heroku buildpack][buildpack] for [Go][go].

## Getting Started

Follow the guide at
<http://mmcgrana.github.com/2012/09/getting-started-with-go-on-heroku.html>.

There's also a hello world sample app at
<https://github.com/kr/go-heroku-example>.

## Example

```
$ ls -A1
.git
Godeps
Procfile
web.go

$ heroku create -b https://github.com/heroku/heroku-buildpack-go.git
Creating polar-waters-4785...
...

$ git push heroku master
...
-----> Fetching custom git buildpack... done
-----> Go app detected
-----> Installing go1.4.1... done
-----> Running: godep go install -tags heroku ./...
-----> Discovering process types
       Procfile declares types -> web

-----> Compressing... done, 1.6MB
-----> Launching... done, v4
       https://polar-waters-4785.herokuapp.com/ deployed to Heroku
```

This buildpack will detect your repository as Go if it contains a `.go` file.

This buildpack adds a `heroku` [build constraint][build-constraint], to enable
heroku-specific code. See the [App Engine build constraints
article][app-engine-build-constraints] for more.

## Hacking on this Buildpack

To change this buildpack, fork it on GitHub. Push changes to your fork, then
create a test app with `--buildpack YOUR_GITHUB_GIT_URL` and push to it. If you
already have an existing app you may use `heroku config:add
BUILDPACK_URL=YOUR_GITHUB_GIT_URL` instead of `--buildpack`.

## Godeps vs .godir

This buildpack supports the use of [godep][godep], which will be used to
install the project and it's vendored dependencies if a `Godeps/Godep.json`
file exists. Otherwise this buildpack requires a file named `.godir` in the
root of your project to determine the name of the project and will use the
go toolchain to download dependencies.

## Using with cgo

This buildpack supports building with C dependencies via
[cgo][cgo]. You can set config vars to specify CGO flags<commit_msg>Doc changes<commit_after># Heroku Buildpack: Go

This is the [Heroku buildpack][buildpack] for [Go][go].

## Getting Started


Follow the guide at
<https://devcenter.heroku.com/articles/getting-started-with-go>

There's also a hello world sample app at
<https://github.com/heroku/go-getting-started> 

## Example

```
$ ls -A1
.git
Godeps
Procfile
web.go

$ heroku create
Creating polar-waters-4785...
...

$ git push heroku master
...
-----> Fetching custom git buildpack... done
-----> Go app detected
-----> Installing go1.4.1... done
-----> Running: godep go install -tags heroku ./...
-----> Discovering process types
       Procfile declares types -> web

-----> Compressing... done, 1.6MB
-----> Launching... done, v4
       https://polar-waters-4785.herokuapp.com/ deployed to Heroku
```

This buildpack will detect your repository as Go if it contains a `.go` file.

This buildpack adds a `heroku` [build constraint][build-constraint], to enable
heroku-specific code. See the [App Engine build constraints
article][app-engine-build-constraints] for more.

## Hacking on this Buildpack

To change this buildpack, fork it on GitHub. Push changes to your fork, then
create a test app with `--buildpack YOUR_GITHUB_GIT_URL` and push to it. If you
already have an existing app you may use `heroku config:add
BUILDPACK_URL=YOUR_GITHUB_GIT_URL` instead of `--buildpack`.

## Godeps vs .godir

This buildpack supports the use of [godep][godep], which will be used to
install the project and it's vendored dependencies if a `Godeps/Godep.json`
file exists. Otherwise this buildpack requires a file named `.godir` in the
root of your project to determine the name of the project and will use the
go toolchain to download dependencies.

See [Go Dependencies via Godep](https://devcenter.heroku.com/articles/go-dependencies-via-godep) for more.

## Using with cgo

This buildpack supports building with C dependencies via
[cgo][cgo]. You can set config vars to specify CGO flags
{'fraction_non_alphanumeric': 0.11347336065573771, 'fraction_numerical': 0.009221311475409836, 'mean_word_length': 3.6322657176749704, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 23, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1234611', 'n_tokens_mistral': 1260, 'n_tokens_neox': 1179, 'n_words': 475}