Hi StalkR,
Thanks for the reply..I looked into net/url package for the URL string creation but i donot know if I am doing the right way..
package main
import (
"fmt"
"net"
"os"
)
func main() {
name,_:=os.Hostname()
addrs,_:=net.LookupHost(name)
fmt.Println(addrs)
}
ouput :
[fe80::79b0:e252:515f:eb4d fe80::4d0:e6b0:7ece:854d 172.31.81.78 2001:0:9d38:6abd:4d0:e6b0:7ece:854d]
This is not how I want, like in JAVA , the code in my previous post will return the hostaddress in readable string..how to achieve the same in Go.
Also for url string..
Can I do something like this :
for i:=0;i<10;i++{
url=URL{"https",nil,nil,addrs,..........} //similarly setting other properties and using addrs from above.
stud.createMyPage(url.String())
}
Is this the right way to do?
Please guide..
Thanks Abhinav