This repo contains simple helloworld applications which helps you to set up, run your first application first using go CLI command and then enhacing your helloworld application using glide.
You can find two projects in this repository:
- helloworld-basic: A Hello World CLI Application which you use go CLI commands to build and run your application
- helloworld-glide: A Hello World CLI Application using glide package manager CLI commnads to build and run your application
In order to run this application without any error and running make sure you have already installed Go and Glide
In order to install Go framework on visit my tutorial page here: http://kabiliravi.com/index.php/software/programming/golang/install/
For installing Glide you can visit this page to learn more about it: http://kabiliravi.com/index.php/software/programming/golang/install-glide/
Your go workspace directory should be under $GOPATH/src and $GOPATH will point to $HOME/go
$ mkdir $GOPATH/src/gotutorial
Clone the helloworld git repository into gotutrial workspace folder by following commnad:
$ git clone https://github.com/gotutorial/helloworld.git
$ cd helloworld
Build helloworld-basic by following command
$ cd $GOPATH/gototurial/helloworld/helloworld-basic
$ go build -o hello
Run hello executable file by following commnad
$ ./hello
Hello World
Build helloworld-glide by following command
$ cd $GOPATH/gototurial/helloworld/helloworld-glide
$ glide install
[INFO] Lock file (glide.lock) does not exist. Performing update.
[INFO] Downloading dependencies. Please wait...
[INFO] --> Fetching updates for github.com/dustin/go-humanize
[INFO] Resolving imports
[INFO] Downloading dependencies. Please wait...
[INFO] Setting references for remaining imports
[INFO] Exporting resolved dependencies...
[INFO] --> Exporting github.com/dustin/go-humanize
[INFO] Replacing existing vendor dependencies
[INFO] Project relies on 1 dependencies.
$ go build -o hello
Run hello executable file by following commnad
$ ./hello
Hello World !!
Sample File Size in MB: 48 MB.
You can learn more by visiting following pages in my website
Find the tutoral of how I wrote these helloworld applications here: http://kabiliravi.com/index.php/software/programming/golang/helloworld/
Find the tutoral of how I wrote these helloworld using Glide applications here: http://kabiliravi.com/index.php/software/programming/golang/helloworld-using-glide/