// RawSectionNames returns all section names from File in a raw (unmanipulated)
// format.
438755
func (f *File) RawSectionNames() []string {
	names := make([]string, len(f.sections))
	for i, s := range f.sections {
		names[i] = s.RawName()
	}
	return names
}
558629
func NameSystems() namer.NameSystems {
	return namer.NameSystems{
		"public":  namer.NewPublicNamer(0),
		"private": namer.NewPrivateNamer(0),
		"raw":     namer.NewRawNamer("", nil),
	}
}
92949
func (s *Section) ChildSections() []*Section {
	prefix := s.name + "."
	children := make([]*Section, 0, 3)
	for _, name := range s.f.sectionList {
		if strings.HasPrefix(name, prefix) {
			children = append(children, s.f.sections[name])
		}
	}
	return children
}
86553
func normalizePaths(paths []string) ([]string, string, error) {
	namenode := ""
	cleanPaths := make([]string, 0, len(paths))

	for _, rawurl := range paths {
		url, err := url.Parse(rawurl)
		if err != nil {
			return nil, "", err
		}

		if url.Host != "" {
			if namenode != "" && namenode != url.Host {
				return nil, "", errMultipleNamenodeUrls
			}

			namenode = url.Host
		}

		cleanPaths = append(cleanPaths, path.Clean(url.Path))
	}

	return cleanPaths, namenode, nil
}
742740
func (a *API) ShapeNames() []string {
	i, names := 0, make([]string, len(a.Shapes))
	for n := range a.Shapes {
		names[i] = n
		i++
	}
	sort.Strings(names)
	return names
}
334805
func FormatNameList() []string {
	var names []string

	for name := range formatters {
		names = append(names, name)
	}

	return names
}
446903
func (c *Client) AlternateNames() ([]*models.AlternateName, error) {
	var err error
	var result []*models.AlternateName

	zipped, err := httpGet(geonamesURL + alternateNamesURL)
	if err != nil {
		return nil, err
	}

	files, err := unzip(zipped)
	if err != nil {
		return nil, err
	}

	data, err := getZipData(files, "alternateNames.txt")
	if err != nil {
		return nil, err
	}

	parse(data, 0, func(raw [][]byte) bool {
		if len(raw) != 8 {
			return true
		}

		if string(raw[2]) == "link" {
			return true
		}

		id, err := strconv.Atoi(string(raw[0]))
		if err != nil {
			log.Printf("while converting alternate name %s modification id: %s", string(raw[0]), err.Error())
			return true
		}
		geonameID, err := strconv.Atoi(string(raw[1]))
		if err != nil {
			log.Printf("while converting alternate name %s modification geoname id: %s", string(raw[1]), err.Error())
			return true
		}

		result = append(result, &models.AlternateName{
			ID:              id,
			GeonameID:       geonameID,
			IsoLanguage:     string(raw[2]),
			Name:            string(raw[3]),
			IsPreferredName: string(raw[4]) == boolTrue,
			IsShortName:     string(raw[5]) == boolTrue,
			IsColloquial:    string(raw[6]) == boolTrue,
			IsHistoric:      string(raw[7]) == boolTrue,
		})

		return true
	})

	return result, nil
}
1221074
func ParseName(raw string) Name {
	n := Name{
		Raw:   raw,
		Short: raw,
		Long:  raw,
	}

	tokens := strings.Split(raw, " - ")
	switch {
	case len(tokens) == 0:
		// Just use raw name.
	case len(tokens) == 1:
		n.Short = tokens[0]
	case len(tokens) == 2:
		n.Short = tokens[0]
		n.Long = tokens[1]
	}

	n.Short = stripAS(n.Short)
	n.Long = stripAS(n.Long)
	return n
}
497321
func ExtractRootPaths(paths []string) []string {
	r := make([]string, len(paths))
	for i, p := range paths {
		root := filepath.ToSlash(p)
		sections := strings.Split(root, "/")
		for _, section := range sections {
			if section != "" {
				root = section
				break
			}
		}
		r[i] = root
	}
	return r

}
91901
func (c *ChainIndexer) Sections() (uint64, uint64, common.Hash) {
	c.lock.Lock()
	defer c.lock.Unlock()

	return c.storedSections, c.storedSections*c.sectionSize - 1, c.SectionHead(c.storedSections - 1)
}
473872
func (ss *segmentStack) ChildCollectionNames() ([]string, error) {
	var childCollections = make([]string, len(ss.childSegStacks))
	idx := 0
	for name := range ss.childSegStacks {
		childCollections[idx] = name
		idx++
	}
	return childCollections, nil
}
113958
func (c *Config) Section(name string) *Section {
	for i := len(c.Sections) - 1; i >= 0; i-- {
		s := c.Sections[i]
		if s.IsName(name) {
			return s
		}
	}

	s := &Section{Name: name}
	c.Sections = append(c.Sections, s)
	return s
}
740191
func (this *MarkupAsciiDoc) sectionHeader(level int, text string) string {
	return fmt.Sprintf("%s %s\n", strings.Repeat("=", level), text)
}
356958
func (f File) Section(name string) Section {
	section := f[name]
	if section == nil {
		section = make(Section)
		f[name] = section
	}
	return section
}
1279026
func RegionNames(regions []Region) []string {
	names := make([]string, len(regions))
	for i, region := range regions {
		names[i] = region.Name
	}
	sort.Strings(names)
	return names
}
1011098
func segmentFileNames(dir string) ([]string, error) {
	names, err := filepath.Glob(filepath.Join(dir, fmt.Sprintf("%s*.%s", WALFilePrefix, WALFileExtension)))
	if err != nil {
		return nil, err
	}
	sort.Strings(names)
	return names, nil
}
1120394
func (f *File) ChildSections(name string) []*Section {
	return f.Section(name).ChildSections()
}