[33] Results

Golang : Output or print out JSON stream/encoded data

golang json-stream write-to-responsewriter content-type

Problem :

You need to produce JSON stream or JSON encoded data to web browser or client. How to do….... read more

Golang : Write file with io.WriteString

golang write-file

Writing to a file in Golang is easy. There are couple of ways to do it. In this tutorial, we….... read more

Golang : constant 20013 overflows byte error message

golang write-byte

Haven't been updating the tutorials portion for a while as I was busy writing up examples for Golang bytes package.….... read more

Golang : Set and Get HTTP request headers example

golang set-headers get-headers http-responsewriter

Couple of examples on how to set and get HTTP request headers in Golang.

Example of setting HTTP request header.

.... read more

Golang : Change file read or write permission example

golang write-permission read-permission change-permissions

Problem :

You have a file and you need to change a file read, write or execute permission. How to….... read more

Golang : Test file read write permission example

golang write-permission read-permission os-openfile os-ispermission

Problem :

You need to test if a file has the correct write or read permission before performing write or….... read more

Golang : How to convert JSON string to map and slice

golang json-to-map json-to-slice array

Couple of simple examples on how to convert JSON string to map and slice(array).

Simple and straightforward way of converting….... read more

Golang : Convert string slice to struct and access with reflect example

golang reflect slice-to-struct

Writing this down here for my own future references. Basically, what this code does is to convert a given string….... read more