Recent Posts

Detract yet delight written farther his general. If in so bred at dare rose lose good. Feel and make two real miss use easy.
February 7, 2015
Golang create directory

Creating a directory from Google Go is simple with the "os" package. See the example below. Golang create directory example path := "/folder/to/create" err := os.MkdirAll(path,0711) if err != nil { log.Println("Error creating directory") log.Println(err) return }

Read More
February 7, 2015
Golang delete file

Deleting a file from Google Go (Golang) is simple with the "os" package. See the example below. Golang delete file example path := "/path/to/file/to/delete" err := os.Remove(path) if err != nil { fmt.Println(err) return }

Read More
February 2, 2015
Golang html/template range: access out of loop variable

When you use range in a Golang html/template the "." variable changes to the current object from the range. We can however still access to old "." variable with "$": {{range $index, $emp := .employees}} {{ $emp.name }} {{ msg $ "btn_show" }} {{ end }}

Read More
February 2, 2015
Golang substr or substring equivalent

Strings are slices in Google Go, so there is really no need for a Golang substr function. For example if you would want to get the first 10 characters of a string: dt := "2015-01-01 15:45:12" d := dt[0:10] The resulting value in d will be: "2015-01-01".

Read More
XFerion Europe LLP
We build an maintain your software. From web to mobile. From MVP to extended product. Contact us if you wish to discuss a project.
CONTACT US