// setHostnameRhel responsible for setting hostname for
// a distro based on RHEL(RHEL,CentOS...)
555194
func setHostnameRhel(hostname, file string) error {
	return ioutils.FindAndReplace(file, file, `HOSTNAME\s*=\s*\S+`,
		fmt.Sprintf("HOSTNAME=%s", hostname), 0644)
}
636051
func (s *Selection) SetHtml(html string) *Selection {
	return setHtmlNodes(s, parseHtml(html)...)
}
260270
func (s *SamplingRule) SetHost(v string) *SamplingRule {
	s.Host = &v
	return s
}
1256743
func (s *RedirectAllRequestsTo) SetHostName(v string) *RedirectAllRequestsTo {
	s.HostName = &v
	return s
}
1238858
func (s *PollForTaskInput) SetHostname(v string) *PollForTaskInput {
	s.Hostname = &v
	return s
}
305854
func (c *Client) SetHost(h string) *Client {
	c.Host = h
	return c
}
875015
func (s *InstanceAccessDetails) SetHostKeys(v []*HostKeyAttributes) *InstanceAccessDetails {
	s.HostKeys = v
	return s
}
684440
func setHostnameDebian(hostname, file string) error {
	return ioutil.WriteFile(file, []byte(hostname), 0)
}
453148
func SetHostsDefault(defaultIface string, force bool) error {
	hname, err := os.Hostname()
	if err != nil {
		return err
	}
	if _, err := net.LookupHost(hname); err == nil {
		if force == false {
			return nil
		}
	}
	iface, err := netutils.GetIfaceAddr(defaultIface)
	if err != nil {
		return err
	}
	return SetHosts(hname, strings.Split(iface.String(), "/")[0])
}
104632
func (b *Bundle) buildHostnames() {
	if b.Cert == nil {
		return
	}
	// hset keeps a set of unique hostnames.
	hset := make(map[string]bool)
	// insert CN into hset
	if b.Cert.Subject.CommonName != "" {
		hset[b.Cert.Subject.CommonName] = true
	}
	// insert all DNS names into hset
	for _, h := range b.Cert.DNSNames {
		hset[h] = true
	}

	// convert hset to an array of hostnames
	b.Hostnames = make([]string, len(hset))
	i := 0
	for h := range hset {
		b.Hostnames[i] = h
		i++
	}
}
1177280
func (s *CreateUserInput) SetHomeDirectory(v string) *CreateUserInput {
	s.HomeDirectory = &v
	return s
}
9200
func (u *URI) setHost(host string) error {
	m := hostRegexp.FindStringSubmatch(host)
	if m == nil {
		return errors.New("invalid host")
	}
	u.Host = host
	return nil
}
903900
func hostname() string {
	hostname, err := os.Hostname()
	if err != nil {
		return "unknown"
	}

	name, _ := parseHostname(hostname)
	return sanitizeHostname(name)
}
917503
func (s *OriginationRoute) SetHost(v string) *OriginationRoute {
	s.Host = &v
	return s
}
32057
func hasHostNamespace(pod *v1.Pod) bool {
	if pod.Spec.SecurityContext == nil {
		return false
	}
	return pod.Spec.HostIPC || pod.Spec.HostNetwork || pod.Spec.HostPID
}
577883
func (s *ListedUser) SetHomeDirectory(v string) *ListedUser {
	s.HomeDirectory = &v
	return s
}
326274
func (s *AgentInfo) SetHostName(v string) *AgentInfo {
	s.HostName = &v
	return s
}