Markdown formatting
This commit is contained in:
51
README.md
51
README.md
@@ -1,10 +1,16 @@
|
|||||||
# Golang Vagrant Environment
|
# 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.
|
[Golang](http://golang.org/) has a slightly more complex setup procedure
|
||||||
This repo aims to alleviate the problems starting a golang project by providing a vagrant environment and puppet script
|
compared to other languages as it uses a *workspace* concept. Getting the
|
||||||
that will setup and prepare all the required pre-requisits.
|
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
|
## Requirements
|
||||||
|
|
||||||
In order to use this repository you need the following:
|
In order to use this repository you need the following:
|
||||||
|
|
||||||
- [VirtualBox](https://www.virtualbox.org/)
|
- [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)
|
- [Puppet](http://docs.puppetlabs.com/guides/installation.html)
|
||||||
|
|
||||||
## Using vagrant-golang
|
## 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:
|
Clone or copy the repo and do the following:
|
||||||
```bash
|
|
||||||
cd /path/to/repo
|
$ cd /path/to/repo
|
||||||
vagrant up
|
$ vagrant up
|
||||||
vagrant ssh
|
$ vagrant ssh
|
||||||
# ...
|
# ...
|
||||||
go version
|
$ go version
|
||||||
go install hello
|
$ go install hello
|
||||||
hello
|
$ hello
|
||||||
# hello, world
|
# hello, world
|
||||||
```
|
|
||||||
|
|
||||||
## Choosing golang version
|
## 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
|
This repo is hardcoded to use 1.4 although this can easily be changed after
|
||||||
[golang downloads list](http://golang.org/dl/). Once changed you can either call `vagrant up` if you
|
cloning. If you want to use another version simply set the `$version` parameter
|
||||||
haven't already setup the vagrant box or `vagrant provision` if the machine is already up.
|
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
|
### 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
|
### License
|
||||||
|
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2013 Darren Coxall
|
Copyright (c) 2013 Darren Coxall
|
||||||
|
|||||||
Reference in New Issue
Block a user