func loadPatterns()

in pkg/gitignore/dir.go [46:59]


func loadPatterns(cfg *gconfig.Config) (ps []gitignore.Pattern, err error) {
	s := cfg.Raw.Section(coreSection)
	efo := s.Options.Get(excludesfile)
	if efo == "" {
		return nil, nil
	}

	ps, err = readIgnoreFile(osfs.New(""), nil, efo)
	if os.IsNotExist(err) {
		return nil, nil
	}

	return
}