// Name returns a user-friendly description of the key press.
491647
func (ev *KeyEvent) Name() string {
	s := ""
	m := []string{}
	if ev.Modifiers&ModShift != 0 {
		m = append(m, "Shift")
	}
	if ev.Modifiers&ModAlt != 0 {
		m = append(m, "Alt")
	}
	if ev.Modifiers&ModMeta != 0 {
		m = append(m, "Meta")
	}
	if ev.Modifiers&ModCtrl != 0 {
		m = append(m, "Ctrl")
	}

	ok := false
	if s, ok = keyNames[ev.Key]; !ok {
		if ev.Key == KeyRune {
			s = string(ev.Rune)
		} else {
			s = "Unknown"
		}
	}
	if len(m) != 0 {
		if ev.Modifiers&ModCtrl != 0 && strings.HasPrefix(s, "Ctrl-") {
			s = s[5:]
		}
		return fmt.Sprintf("%s+%s", strings.Join(m, "+"), s)
	}
	return s
}
959673
func (t *File) Name() string {
	if t.fh == nil {
		return ""
	}
	return t.fh.Name()
}
1323527
func (r *Application) Name(id string) *Application {
	r.ID = validateID(id)
	return r
}
259873
func (f Frame) name() string {
	fn := runtime.FuncForPC(f.pc())
	if fn == nil {
		return "unknown"
	}
	return fn.Name()
}
451564
func (r *Route) Name(name string) *Route {
	r.name = name
	r.group.router.routes[name] = r
	return r
}
744078
func Name(name string) {
	switch def := dslengine.CurrentDefinition().(type) {
	case *design.ContactDefinition:
		def.Name = name
	case *design.LicenseDefinition:
		def.Name = name
	default:
		dslengine.IncompatibleDSL()
	}
}
449114
func Name(name string) Option {
	return func(o *Options) error {
		o.Name = name
		return nil
	}
}
655398
func (s *Session) Name() string {
	if s.sessionType == apitypes.MachineSession {
		return s.identity.(*envelope.Machine).Body.Name
	}

	return s.identity.(envelope.UserInf).Name()
}
512745
func (s *LookupService) Name(ctx context.Context, resource platform.ResourceType, id platform.ID) (string, error) {
	return s.NameFn(ctx, resource, id)
}
1243890
func (r *Route) Name(name string) *Route {
	r.route.Name(name)
	return r
}
582498
func (v mergeVal) Name() string {
	type namedValue interface {
		Name() string
	}
	if nVal, ok := v.Value.(namedValue); ok {
		return nVal.Name()
	}
	return v.key
}
50096
func (f *Flag) Name() string {
	if len(f.Long) > 0 {
		return "--" + f.Long
	}
	if len(f.Short) > 0 {
		return "-" + f.Short
	}
	return "<unspecified>"
}
739283
func (e Event) Name() string {
	return lint.Name(strings.Title(e.NameName))
}
135929
func (a *Album) Name() string {
	return C.GoString(C.sp_album_name(a.sp_album))
}
691401
func (s *Switch) Name() (name string) {
	s.PortIter(func(port *mech.SwitchPort) (ok bool) {
		if ok = port.Number != uint32(ofp.P_LOCAL); !ok {
			log.DebugLog("switch/SWITCH_NAME",
				"Found local port name: ", port.Name)

			name = port.Name
		}

		return
	})

	if name == "" {
		log.ErrorLog("switch/SWITCH_NAME",
			"Failed to find switch local port")
	}

	return
}
948354
func (c *UsersProfileSetCall) Name(name string) *UsersProfileSetCall {
	c.name = name
	return c
}
659104
func (s *Service) Name(name string) (*ResultName, error) {
	entry, err := s.nameReg.GetName(name)
	if err != nil {
		return nil, err
	}
	if entry == nil {
		return nil, fmt.Errorf("name %s not found", name)
	}
	return &ResultName{Entry: entry}, nil
}