// addName adds the file with the given name to the index.
// It returns the assigned file ID number.
773091
func (ix *IndexWriter) addName(name string) uint32 {
	if strings.Contains(name, "\x00") {
		log.Fatalf("%q: file has NUL byte in name", name)
	}

	ix.nameIndex.writeUint32(ix.nameData.offset())
	ix.nameData.writeString(name)
	ix.nameData.writeByte(0)
	id := ix.numName
	ix.numName++
	return uint32(id)
}
845028
func (s *DescribeIndexOutput) SetIndexName(v string) *DescribeIndexOutput {
	s.IndexName = &v
	return s
}
714908
func (idx *Index) AddColumn(name string, cardinality uint64) {
	idx.Columns = append(idx.Columns, sqlparser.NewColIdent(name))
	if cardinality == 0 {
		cardinality = uint64(len(idx.Cardinality) + 1)
	}
	idx.Cardinality = append(idx.Cardinality, cardinality)
}
145424
func (b *UpdateBuilder) AddNamed(column, name string) *UpdateBuilder {
	return b.addValue(column, param(name))
}
299872
func (s *ElasticsearchDestinationConfiguration) SetIndexName(v string) *ElasticsearchDestinationConfiguration {
	s.IndexName = &v
	return s
}
1024670
func (s *IndicesPutTemplateService) Name(name string) *IndicesPutTemplateService {
	s.name = name
	return s
}
770434
func (h *Handler) indexName() string {
	return fmt.Sprintf("%s-%s", h.Config.Prefix, time.Now().Format("2006.01.02"))
}
1050359
func (s *CreateDynamicThingGroupOutput) SetIndexName(v string) *CreateDynamicThingGroupOutput {
	s.IndexName = &v
	return s
}
1320044
func (F *Frisby) AddFile(filename string) *Frisby {
	file, err := os.Open(filename)
	if err != nil {
		F.Errs = append(F.Errs, err)
	} else {
		fileField := request.FileField{
			FieldName: defaultFileKey,
			FileName:  filepath.Base(filename),
			File:      file}
		F.Req.Files = append(F.Req.Files, fileField)
	}
	return F
}
115066
func (p *FileProvider) filename() (string, error) {
	if p.Filename == "" {
		if p.Filename = os.Getenv(FileCredentialsEnvVarFile); p.Filename != "" {
			return p.Filename, nil
		}

		homeDir := os.Getenv("HOME") // *nix
		if homeDir == "" {           // Windows
			homeDir = os.Getenv("USERPROFILE")
		}
		if homeDir == "" {
			return "", ErrFileCredentialsHomeNotFound
		}

		p.Filename = filepath.Join(homeDir, ".spotinst", "credentials")
	}

	return p.Filename, nil
}
959673
func (t *File) Name() string {
	if t.fh == nil {
		return ""
	}
	return t.fh.Name()
}
879416
func (s *ElasticsearchDestinationDescription) SetIndexName(v string) *ElasticsearchDestinationDescription {
	s.IndexName = &v
	return s
}
692375
func (f *File) Name() string {
	name := strings.Split(f.fileID, ";")[0]
	return strings.ToLower(name)
}
995896
func (a *Addr) fileName() string {
	return fmt.Sprintf("%s:%s", a.Network(), a.String())
}
578310
func (s *FileInfo) Name() string {
	s.Lock()
	_, name := filepath.Split(s.name)
	s.Unlock()
	return name
}
120787
func (s *ReplicaGlobalSecondaryIndexSettingsUpdate) SetIndexName(v string) *ReplicaGlobalSecondaryIndexSettingsUpdate {
	s.IndexName = &v
	return s
}
263955
func (s *FileSystemDescription) SetName(v string) *FileSystemDescription {
	s.Name = &v
	return s
}