// FeatureNames shows supported features by their name.
501796
func (e *Ethtool) FeatureNames(intf string) (map[string]uint, error) {
	ssetInfo := ethtoolSsetInfo{
		cmd:       ETHTOOL_GSSET_INFO,
		sset_mask: 1 << ETH_SS_FEATURES,
	}

	if err := e.ioctl(intf, uintptr(unsafe.Pointer(&ssetInfo))); err != nil {
		return nil, err
	}

	length := uint32(ssetInfo.data)
	if length == 0 {
		return map[string]uint{}, nil
	} else if length > MAX_GSTRINGS {
		return nil, fmt.Errorf("ethtool currently doesn't support more than %d entries, received %d", MAX_GSTRINGS, length)
	}

	gstrings := ethtoolGStrings{
		cmd:        ETHTOOL_GSTRINGS,
		string_set: ETH_SS_FEATURES,
		len:        length,
		data:       [MAX_GSTRINGS * ETH_GSTRING_LEN]byte{},
	}

	if err := e.ioctl(intf, uintptr(unsafe.Pointer(&gstrings))); err != nil {
		return nil, err
	}

	var result = make(map[string]uint)
	for i := 0; i != int(length); i++ {
		b := gstrings.data[i*ETH_GSTRING_LEN : i*ETH_GSTRING_LEN+ETH_GSTRING_LEN]
		key := string(bytes.Trim(b, "\x00"))
		if key != "" {
			result[key] = uint(i)
		}
	}

	return result, nil
}
1014205
func (q *query) fieldNames() []string {
	switch {
	case q.hasIncludes():
		return q.includes
	case q.hasExcludes():
		results := q.collection.spec.fieldNames()
		for _, name := range q.excludes {
			results = removeElementFromStringSlice(results, name)
		}
		return results
	default:
		return q.collection.spec.fieldNames()
	}
}
1170160
func (s *AddRoleToDBClusterInput) SetFeatureName(v string) *AddRoleToDBClusterInput {
	s.FeatureName = &v
	return s
}
1277289
func (s *DBClusterRole) SetFeatureName(v string) *DBClusterRole {
	s.FeatureName = &v
	return s
}
522032
func (b *Backends) Names() []string {
	var names []string
	for _, backend := range b.Backends {
		names = append(names, backend.Name)
	}
	return names
}
382032
func (s *ServiceId) SetNames(v []*string) *ServiceId {
	s.Names = v
	return s
}
784220
func (s *FaultRootCauseService) SetNames(v []*string) *FaultRootCauseService {
	s.Names = v
	return s
}
510517
func (s *RemoveRoleFromDBInstanceInput) SetFeatureName(v string) *RemoveRoleFromDBInstanceInput {
	s.FeatureName = &v
	return s
}
40411
func (s *BatchGetProjectsInput) SetNames(v []*string) *BatchGetProjectsInput {
	s.Names = v
	return s
}
80045
func unitNames(units map[string]string) string {
	unitIds := make([]string, len(units))
	i := 0
	for u := range units {
		unitIds[i] = u
		i++
	}
	return strings.Join(unitIds, ", ")
}
688457
func (r *Type) MethodNames() []string {
	names := make([]string, 0, len(r.method))
	for name := range r.method {
		names = append(names, name)
	}
	sort.Strings(names)
	return names
}
172466
func (s *RemoveRoleFromDBClusterInput) SetFeatureName(v string) *RemoveRoleFromDBClusterInput {
	s.FeatureName = &v
	return s
}
1284377
func (a *Application) UnitNames() ([]string, error) {
	u, err := appUnitNames(a.st, a.Name())
	return u, errors.Trace(err)
}
132259
func (a Fields) Names() []string {
	names := []string{}
	for _, f := range a {
		switch expr := f.Expr.(type) {
		case *Call:
			names = append(names, expr.Name)
		case *VarRef:
			names = append(names, expr.Val)
		case *BinaryExpr:
			names = append(names, walkNames(expr)...)
		case *ParenExpr:
			names = append(names, walkNames(expr)...)
		}
	}
	return names
}
1062098
func (s *ListAssociatedStacksOutput) SetNames(v []*string) *ListAssociatedStacksOutput {
	s.Names = v
	return s
}
552960
func (ctx *Context) GetVarNames() (names []string) {
	for name, _ := range ctx.GetAllVars() {
		names = append(names, name)
	}

	sort.Strings(names)
	return
}
856541
func (s *Service) SetNames(v []*string) *Service {
	s.Names = v
	return s
}