code: func getLocalIPs() (ips []string) {
  	ips = make([]string, 0, 6)
  
  	addrs, err := net.InterfaceAddrs()
  	if err != nil {
  		return
  	}
  
  	for _, addr := range addrs {
  		ip, _, err := net.ParseCIDR(addr.String())
  		if err != nil {
  			continue
  		}
  		ips = append(ips, ip.String())
  	}
  	return
  }
docs: // getLocalIPs returns local ips.