Showing posts with label golang. Show all posts
Showing posts with label golang. Show all posts

Sunday, 10 May 2015

Go, Docker, Joyent, and New Relic


Go, Docker, Joyent, and New Relic IN PROGRESS

  • Go Language Installation: 
    • Download and install GoLang installer here
    • Download and install Go Tools to /usr/local/go and include /usr/local/go/bin in PATH env and restart terminal
 $ mkdir $HOME/code/workspace_go
 $ export GOPATH=$HOME/code/workspace_go
 $ export PATH=$PATH:$GOPATH/bin
    • Create Base Path
$ mkdir -p $GOPATH/src/github.com/ltfschoen
    • Create First Program
$ mkdir $GOPATH/src/github.com/ltfschoen/go_test/hello
    • Create hello.go file (ready to use the reverse.go Package dependency)

package main 

import (
"fmt"
"github.com/ltfschoen/go_test/stringutil"
) 

func main() {
fmt.Printf(stringutil.Reverse("!oG ,olleH\n"))
}
    • Build and Run binary to test Go Tool installation success

        $ go install github.com/ltfschoen/go_test/hello

        $ $GOPATH/bin/hello
    • Setup Git Repo

$ cd $GOPATH/src/github.com/ltfschoen/go_test/hello
$ git init
$ git remote add origin git@github.com:ltfschoen/GoTest.git
$ git add --all .
$ git commit -m "Initial commit"
$ git pull origin master
$ git push origin master
    • Write Go library (with Package directory)
$ mkdir $GOPATH/src/github.com/ltfschoen/go_test/stringutil
    • Create Package dependency stringutil reverse.go and test compilation success 
      • Note: 'go install' produces an output file, placing the package object inside the pkg directory of the workspace)
$ go build github.com/ltfschoen/go_test/stringutil
    • Install hello.go program using the Go Tool to install the reverse.go Package and other dependencies
$ go install github.com/ltfschoen/go_test/hello
    • Create reverse_test.go file with functions to be run by the Go Testing Framework and Package and Run Go Test
$ touch $GOPATH/src/github.com/ltfschoen/go_test/stringutil/reverse_test.go$ go test github.com/ltfschoen/go_test/stringutil 

References:
Books
  • 50% READ Docker New Relic Preview Edition
  • 50% READ Programming in Go
  • TODO Orchestrating Docker
  • TODO The Go Programming Language
Events

Thursday, 12 June 2014

Upcoming Event Bookings

Events
  • ATTENDED muru-D Intern Night, Thur, 19 June 2014 6pm to 8:30pm, 363 Oxford St, Paddington
  • GRADUATED! Sydney NodeSchool, Sydney, 9am - 4pm June 21st, 2014, NICTA, Level 5, 13 Garden St, Eveleigh 
  • ATTENDED Intersect - FASS eResearch: Working with big data sets – data mining, 1:30pm to 5pm, 23 June 2014, eLearning Lab CR322, Building A18 Brennan MacCallum University of Sydney
  • ATTENDED Google I/O 2014 Live Keynote @ Fishburners, 11:30pm, Wed, 25 June 2014 
  • ATTENDED Startup Weekend Education (SWEDU) Sydney, at Muru-d SWEDU Sydney, Fri, June 27, 2014 at 6pm Sunday to June 29 2014 at 9:00pm, Paddington
  • SECOND SHOOTER Wedding Photography, 5 July 2014
  • PART ATTENDED Intersect - Introduction to UNIX for High Performance Computing (HPC), (2 day course) Wed, 9 July 2014 at 10am to Thu, 10 July 2014 at 4pm, Room CB02.04.20 (Building 2), University of Technology, 15 Broadway, Ultimo
  • UNABLE Intersect - Data Visualisation with Google Fusion Tables, 10am to 12:30pm 15 July 2013, University of Technology, Room CB02.04.20 (Building 2), 15 Broadway Ultimo
  • UNABLE SydInMotion, 6:30 for 7pm start, 15 July 2014, King St Brewhouse
  • ATTENDING Confidential @ NSW Pitch Night, 15 July 2014, NewSouth Innovations, Level 2, Rupert Myers Building (South), UNSW Kensington Campus, Near Gate 14, Barker Street
  • ATTENDED CocoaHeads Sydney, 6:30, 17 July 2014, Atlassian
  • UNABLE RORO Dev Hub, 6:30 - 9:30pm, 29 July 2014, Ninefold
  • ATTENDING TKSOBU Annual Dinner, Fri, 1 Aug 2014, The Star Room (Level 6, Imax Theatre Complex), 31 Wheat Road, Darling Harbour
  • UNABLE Sydney Educational Technology Meetup, 6 - 7:30pm, 5th Aug 2014, Level 1 @ Fishburners, Ultimo 

Curiosity
Vouchers