Markdown formatting
This commit is contained in:
51
README.md
51
README.md
@@ -1,10 +1,16 @@
|
||||
# Golang Vagrant Environment
|
||||
[Golang](http://golang.org/) has a slightly more complex setup procedure compared to other languages as it uses a *workspace*
|
||||
concept. Getting the environment wrong means many of the go commands fail with some what confusing errors.
|
||||
This repo aims to alleviate the problems starting a golang project by providing a vagrant environment and puppet script
|
||||
that will setup and prepare all the required pre-requisits.
|
||||
|
||||
[Golang](http://golang.org/) has a slightly more complex setup procedure
|
||||
compared to other languages as it uses a *workspace* concept. Getting the
|
||||
environment wrong means many of the go commands fail with some what confusing
|
||||
errors.
|
||||
|
||||
This repo aims to alleviate the problems starting a golang project by providing
|
||||
a vagrant environment and puppet script that will setup and prepare all the
|
||||
required pre-requisits.
|
||||
|
||||
## Requirements
|
||||
|
||||
In order to use this repository you need the following:
|
||||
|
||||
- [VirtualBox](https://www.virtualbox.org/)
|
||||
@@ -12,31 +18,38 @@ In order to use this repository you need the following:
|
||||
- [Puppet](http://docs.puppetlabs.com/guides/installation.html)
|
||||
|
||||
## Using vagrant-golang
|
||||
This repo was developed to be copied and re-used as needed in other projects. It is only meant to make per project golang
|
||||
environments easier to manage. I have tried other golang modules for puppet and they didn't work as expected.
|
||||
|
||||
This repo was developed to be copied and re-used as needed in other projects. It
|
||||
is only meant to make per project golang environments easier to manage. I have
|
||||
tried other golang modules for puppet and they didn't work as expected.
|
||||
|
||||
Clone or copy the repo and do the following:
|
||||
```bash
|
||||
cd /path/to/repo
|
||||
vagrant up
|
||||
vagrant ssh
|
||||
|
||||
$ cd /path/to/repo
|
||||
$ vagrant up
|
||||
$ vagrant ssh
|
||||
# ...
|
||||
go version
|
||||
go install hello
|
||||
hello
|
||||
$ go version
|
||||
$ go install hello
|
||||
$ hello
|
||||
# hello, world
|
||||
```
|
||||
|
||||
## Choosing golang version
|
||||
This repo is hardcoded to use 1.4 although this can easily be changed after cloning. If you want to use another version simply
|
||||
set the `$version` parameter when calling the class. The version string is taken from the
|
||||
[golang downloads list](http://golang.org/dl/). Once changed you can either call `vagrant up` if you
|
||||
haven't already setup the vagrant box or `vagrant provision` if the machine is already up.
|
||||
|
||||
This repo is hardcoded to use 1.4 although this can easily be changed after
|
||||
cloning. If you want to use another version simply set the `$version` parameter
|
||||
when calling the class. The version string is taken from the
|
||||
[golang downloads list](http://golang.org/dl/). Once changed you can either call
|
||||
`vagrant up` if you haven't already setup the vagrant box or `vagrant provision`
|
||||
if the machine is already up.
|
||||
|
||||
### Contributing
|
||||
Any contributions are welcome. Please just fork the repo and submit a pull request when complete.
|
||||
|
||||
Any contributions are welcome. Please just fork the repo and submit a pull
|
||||
request when complete.
|
||||
|
||||
### License
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013 Darren Coxall
|
||||
|
||||
Reference in New Issue
Block a user