// osName returns the name of the OS.
481141
func osName() string {
	buf := &syscall.Utsname{}
	err := syscall.Uname(buf)
	if err != nil {
		return runtime.GOOS
	}
	return charsToString(buf.Sysname)
}
831120
func (u *Unit) Name() string {
	u.mu.Lock()
	defer u.mu.Unlock()
	return u.details.Name
}
542698
func (s *DiskInfo) SetName(v string) *DiskInfo {
	s.Name = &v
	return s
}
528366
func Basename(s string) string {
	n := strings.LastIndexByte(s, '.')
	if n > 0 {
		return s[:n]
	}
	return s
}
642453
func (m *cgroupManagerImpl) Name(name CgroupName) string {
	if m.adapter.cgroupManagerType == libcontainerSystemd {
		return name.ToSystemd()
	}
	return name.ToCgroupfs()
}
859287
func (conn *Conn) ReleaseName(name string) (ReleaseNameReply, error) {
	var r uint32
	err := conn.busObj.Call("org.freedesktop.DBus.ReleaseName", 0, name).Store(&r)
	if err != nil {
		return 0, err
	}
	return ReleaseNameReply(r), nil
}
905833
func (info *Info) Hostname() (string, error) {
	hostname, err := os.Hostname()
	if err != nil {
		return "", fmt.Errorf("logger: can not resolve hostname: %v", err)
	}
	return hostname, nil
}
692375
func (f *File) Name() string {
	name := strings.Split(f.fileID, ";")[0]
	return strings.ToLower(name)
}
1368708
func (s *CreateThreatIntelSetInput) SetName(v string) *CreateThreatIntelSetInput {
	s.Name = &v
	return s
}
653535
func (r *Registry) Filename(templateName string) string {
	var f, ok = r.fileByTemplateName[templateName]
	if !ok {
		log.Println("template not found:", templateName)
		return ""
	}
	return f
}
1140830
func (i *Info) ObjectName() string {
	if i.Mapping != nil {
		return fmt.Sprintf("%s/%s", i.Mapping.Resource.Resource, i.Name)
	}
	gvk := i.Object.GetObjectKind().GroupVersionKind()
	if len(gvk.Group) == 0 {
		return fmt.Sprintf("%s/%s", strings.ToLower(gvk.Kind), i.Name)
	}
	return fmt.Sprintf("%s.%s/%s\n", strings.ToLower(gvk.Kind), gvk.Group, i.Name)
}
522224
func MyHostname() string {
	myHostnameOnce.Do(func() {
		var err error
		myHostname, err = os.Hostname()
		if err != nil {
			log.Fatal(err)
		}
	})
	return myHostname
}
1325353
func (m *Monitor) Name() string {
	var name string
	mainthread.Call(func() {
		name = m.monitor.GetName()
	})
	return name
}
199210
func (s *Span) OperationName() string {
	s.RLock()
	defer s.RUnlock()
	return s.operationName
}
903900
func hostname() string {
	hostname, err := os.Hostname()
	if err != nil {
		return "unknown"
	}

	name, _ := parseHostname(hostname)
	return sanitizeHostname(name)
}
518438
func ptsname(f *os.File) (string, error) {
	n, err := unix.IoctlGetInt(int(f.Fd()), unix.TIOCPTYGNAME)
	if err != nil {
		return "", err
	}
	return fmt.Sprintf("/dev/pts/%d", n), nil
}
666916
func HostName() (string, error) {
	buf, err := exec.Command("hostname").Output()
	if err != nil {
		return "", err
	}
	if buf[len(buf)-1] == 10 {
		buf = buf[:len(buf)-1]
	}
	return string(buf), nil
}