code: func GetRouterByName(sess *session.Session, hostname string, args ...interface{}) (datatypes.Hardware, error) {
  	var mask string
  	if len(args) > 0 {
  		mask = args[0].(string)
  	}
  
  	r, _ := regexp.Compile("[A-Za-z]+[0-9]+$")
  	dcName := r.FindString(hostname)
  	if len(dcName) == 0 {
  		return datatypes.Hardware{}, fmt.Errorf("Cannot get datacenter name from hostname %s", hostname)
  	}
  
  	datacenter, err := location.GetDatacenterByName(sess, dcName, "hardwareRouters[id,hostname]")
  	if err != nil {
  		return datatypes.Hardware{}, err
  	}
  
  	for _, router := range datacenter.HardwareRouters {
  		if *router.Hostname == hostname {
  			return services.GetHardwareService(sess).
  				Id(*router.Id).
  				Mask(mask).
  				GetObject()
  		}
  	}
  
  	return datatypes.Hardware{}, fmt.Errorf("No routers found with hostname of %s", hostname)
  }
docs: // GeRouterByName returns a Hardware that matches the provided hostname,
  // or an error if no matching Hardware can be found.
  // SoftLayer does not provide a direct path to retrieve a list of router
  // objects. So, get Location_Datacenter object at first and get an array of
  // router objects from the Datacenter