add alternative installation with subtress docs

This commit is contained in:
Sam Woodard 2015-07-19 10:55:51 -07:00
parent 0554b45f81
commit 853b80c07a
1 changed files with 19 additions and 1 deletions

View File

@ -13,6 +13,8 @@ Also visit, [Godoc](http://godoc.org/github.com/shwoodard/jsonapi).
go get -u github.com/shoodard/jsonapi
```
Or, see [Alternative Installation](#alternative-installation).
## Background
You are working in your Go web application and you have a struct that is
@ -334,7 +336,23 @@ jsonapi.UnmarshalPayload(w.Body, blog)
// ... assert stuff about blog here ...
```
## Alternative Installations
## Alternative Installation
I use git subtrees to manage dependencies rather than `go get` so that
the src is committed to my repo.
```
git subtree add --squash --prefix=src/github.com/shwoodard/jsonapi git@github.com:shwoodard/jsonapi master
```
To update,
```
git subtree pull --squash --prefix=src/github.com/shwoodard/jsonapi git@github.com:shwoodard/jsonapi master
```
This assumes that I have my repo structured with a `src` dir containing
a collection of packages and `GOPATH` is set to the root
folder--containing `src`.
## Contributing