Giter Club home page Giter Club logo

vagrant-golang's Introduction

vagrant-golang

Vagrant environment for Golang, with support for both go and gb tools.

Description

To use this do something like the following:

git clone https://github.com/reiver/vagrant-golang

# You're probably going to want to create your
# own git repository. So delete the one that
# came with this.

rm -fR .git

cd vagrant

vagrant up

vagrant ssh

# Now you are inside of the vagrant-based virtual machine.

cd /vagrant_project

nano src/main.go

# Put something like the following in main.go
#
# package main
#
# import "fmt"
#
# func main() {
#     fmt.Println("Hello world!")
# }

gb build

./bin/main

IP Address

TL;DR: 10.10.10.10

Unless you change it, the vagrant/Vagrantfile file is configured to use the IP address 10.10.10.10

This is part of (what is called) the "reserved private address space" for IPv4. No public computer on the Internet will use this IP address.

(However, if you are on a private network (which could include your ISP, your office, etc) it is possible they are using it for something. If you have a conflict, simply change that IP address in vagrant/Vagrantfile to something else, and restart vagrant.)

Headless

If you are wondering, why is the VirtualBox window coming up when I run "vagrant up"?, then read this section.

My personal preference is that the VirtualBox window comes up. I don't like (what is called) "headless" mode. With the VirtualBox window being shown, if there is an error, I can often see it.

However, not everyone likes this. So, if you want to swtich to headless mode, then find the line in vagrant/Vagrantfile that says:

vb.gui = true

And change that to:

vb.gui = false

And then restart vagrant.

vagrant-golang's People

Contributors

reiver avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.