User talk:Bhuvana Chinnadurai

Hai Everyone , This is my page where i am going to explore and share knowledge with people.

Day 1 :Friday 20,March,2015 :

A small snippet to find the ip address of the machine in go language:I guess this will be useful at any time in future.

package main

import (	"fmt"	"net" )

func main { addresses, err := net.InterfaceAddrs if err != nil { fmt.Println("err in resolving address::" + err.Error) }	for _, a := range addresses { if ipnet, ok := a.(*net.IPNet); ok && !ipnet.IP.IsLoopback { fmt.Println(ipnet.IP.String) }	} }