[111] Results

Golang : Fix type interface{} has no field or no methods and type assertions example

golang type-assertions interface map-string-interface

For new comers to Golang exploring interface{} for the first time or if you ever use interface{} to handle some….... read more

Golang : Array mapping with Interface

golang interface map array

New comers to Golang often have slight difficulty understanding how interface works in Golang. This is a simple tutorial to….... read more

Golang : Decode/unmarshal unknown JSON data type with map[string]interface

golang json map interface unmarshal decode

This tutorial is courtesy of Rohan Allison on how to decode or unmarshal JSON into map[string]interface. There are….... read more

Golang : How to delete element(data) from map ?

golang delete element map

Problem :

You need to delete some elements from a map.

Such as:

cities := map[string]string{ "city1":"New York", "city2":"Adelaide"….... read more

Golang : Check whether a network interface is up on your machine

golang network-interface probe-status interface-by-name


You have multiple network interfaces on your machine and you need to know the status of a particular network….... read more

Golang : interface - when and where to use examples

golang interface unmarshal object-oriented

Question :

New comer to Golang will need to learn about interface eventually. So what exactly is interface? Where and….... read more

Golang : Get the IPv4 and IPv6 addresses for a specific network interface

golang network-interface IPv4 IPv6 security-reason


You need to find the IP address of a specific network interface on your machine for developing your application.….... read more

Golang : Map within a map example

golang map array

Just an example of map within map in Golang. The example below demonstrates how to put declare a map with….... read more