Go

Go Installation Linux

By: Stephen Patrick | 08 Jun 2016 | Category: Go Introduction

Go Installation Linux

Go can be installed on Linux. To install Go on Linux go to https://golang.org/dl/ and download the latest installation. For example for Linux 64 bit go1.6.2.linux-amd64.tar.gz.

Read More

Go Work Environment

By: Stephen Patrick | 16 Jun 2016 | Category: Go Introduction

Go Work Environment

When working with Go we need to follow certain conventions. When we work with Go code we normally don't work in isolation. We reuse existing libraries. When we are writing Go programs we must follow a directory naming structure.

Read More

Go First Example

By: Stephen Patrick | 10 Jul 2016 | Category: Go Introduction

Go First Example

As a first example lets write a Go Program to print “Hello World!”. As mentioned in order to write Go programs we must follow certain conventions. The code that we write must exist in a workspace. Moreover, if we wish to reuse existing code within our programs that is not part of the standard library it must exist on the GOPATH environment variable.

Read More

Go: Create A Shared Library

By: Stephen Patrick | 13 Jul 2016 | Category: Go Introduction

Go: Create A Shared Library

Previously, we looked at what was involved to create a Go executable. The other type of program that we can create is a shared library.

As we did previously create a new folder (package) in the src directory. Name the folder hellolib. Within this folder create a new file named hello.go with the below code.

Read More

Go Template Engine

By: Stephen Patrick | 11 Sep 2016 | Category: Go Template Engine

Go Template Engine

Go provides a template engine that allows us to define a template consisting of text that conforms to some desired structure with data to produce a final output. We can parameterize a template with meaningful argument names. At runtime the data passed to the template is matched with the arguments by the template engine and the argument placeholders are expanded to produce output for a given context.

Read More

Go Parsing Templates

By: Stephen Patrick | 11 Sep 2016 | Category: Go Template Engine

Go Parsing Templates

As mentioned previously Go provides a template engine that allows us to create template files containing text content which can be rendered as html content. This functionality is provided by the html/template package. Normally, when we wish to create a template we use one of the parse functions of the html/template package.

Read More

Popular Articles