// NewSitemap returns the created the Sitemap's pointer
967645
func NewSitemap(maxProc int) *Sitemap {
	log.SetFlags(log.LstdFlags | log.Llongfile)
	if maxProc < 1 || maxProc > runtime.NumCPU() {
		maxProc = runtime.NumCPU()
	}
	log.Printf("Max processors %d\n", maxProc)
	runtime.GOMAXPROCS(maxProc)

	sm := &Sitemap{
		opts: NewOptions(),
	}
	return sm
}
961187
func (srv *StreamService) Site(params *StreamSiteParams) (*Stream, error) {
	req, err := srv.site.New().Get("site.json").QueryStruct(params).Request()
	if err != nil {
		return nil, err
	}
	return newStream(srv.client, req), nil
}
152571
func NewStatsiteSink(addr string) (*StatsiteSink, error) {
	s := &StatsiteSink{
		addr:        addr,
		metricQueue: make(chan string, 4096),
	}
	go s.flushMetrics()
	return s, nil
}
572704
func NewSchema(solrUrl, core string) (*Schema, error) {
	u, err := url.ParseRequestURI(strings.TrimRight(solrUrl, "/"))
	if err != nil {
		return nil, err
	}

	return &Schema{url: u, core: core}, nil
}
738168
func NewScriptFunction(script string) ScriptFunction {
	return ScriptFunction{
		script: script,
		params: make(map[string]interface{}),
	}
}
1149739
func (o *Me) CreatePATMapper(child *PATMapper) *bambou.Error {

	return bambou.CurrentSession().CreateChild(o, child)
}
1365198
func (o *Me) CreateSiteInfo(child *SiteInfo) *bambou.Error {

	return bambou.CurrentSession().CreateChild(o, child)
}
414733
func (su *sitemapIndexURL) XML() []byte {
	doc := etree.NewDocument()
	sitemap := doc.CreateElement("sitemap")

	SetBuilderElementValue(sitemap, su.data, "loc")

	if _, ok := SetBuilderElementValue(sitemap, su.data, "lastmod"); !ok {
		lastmod := sitemap.CreateElement("lastmod")
		lastmod.SetText(time.Now().Format(time.RFC3339))
	}

	if su.opts.pretty {
		doc.Indent(2)
	}
	buf := poolBuffer.Get()
	doc.WriteTo(buf)

	bytes := buf.Bytes()
	poolBuffer.Put(buf)

	return bytes
}
158497
func (s *LDAPService) NewSearchLdapParams(query string) *SearchLdapParams {
	p := &SearchLdapParams{}
	p.p = make(map[string]interface{})
	p.p["query"] = query
	return p
}
839729
func NewSyncedHashMap() (hm SyncedHashMap) {
	hm.keys = make(map[string]Hashable)
	hm.values = make(map[string]interface{})
	return hm
}
559191
func NewSsoRemoveCertType(Description string) *SsoRemoveCertType {
	s := new(SsoRemoveCertType)
	s.Description = Description
	return s
}
504158
func NewSQLMapper(filename string, conn *sql.DB) (*SQLMapper, error) {
	conf, confErr := GetSQLConfFromFile(filename)
	if confErr != nil {
		return nil, confErr
	}

	return &SQLMapper{conf: conf, sqlConn: conn}, nil
}
493755
func (s *SiteInfo) SitemapAbsURL() string {
	p := s.HomeAbsURL()
	if !strings.HasSuffix(p, "/") {
		p += "/"
	}
	p += s.s.siteCfg.sitemap.Filename
	return p
}
304932
func NewSection(pos position, name, ws string, comment *Comment) *Section {
	var keys []string

	return &Section{
		pos: pos,

		name:    name,
		ws:      ws,
		comment: comment,

		keys: keys,
	}
}
362216
func NewSpritesheetWithBorderFromFile(textureName string, cellWidth, cellHeight, borderWidth, borderHeight int) *Spritesheet {
	res, err := engo.Files.Resource(textureName)
	if err != nil {
		log.Println("[WARNING] [NewSpritesheetWithBorderFromFile]: Received error:", err)
		return nil
	}

	img, ok := res.(TextureResource)
	if !ok {
		log.Println("[WARNING] [NewSpritesheetWithBorderFromFile]: Resource not of type `TextureResource`:", textureName)
		return nil
	}

	return NewSpritesheetWithBorderFromTexture(&img, cellWidth, cellHeight, borderWidth, borderHeight)
}
330924
func NewSiteDefaultLang(withTemplate ...func(templ tpl.TemplateHandler) error) (*Site, error) {
	v := viper.New()
	if err := loadDefaultSettingsFor(v); err != nil {
		return nil, err
	}
	return newSiteForLang(langs.NewDefaultLanguage(v), withTemplate...)
}
1202875
func SourceMap(b bool, path, sourceMapRoot string) option {
	return func(c *sass) error {
		c.ctx.includeMap = b
		c.mappath = path
		if len(sourceMapRoot) > 0 {
			c.sourceMapRoot = sourceMapRoot
		}
		return nil
	}
}