Skip to content
Permalink
Browse files

make sure to increment links count before checking max links and set …

…the correct max file size
  • Loading branch information...
gadelkareem committed May 2, 2018
1 parent 6c3d648 commit bd8f481fbabcb5cc1bf18ecb1c32da69bd41e4b4
Showing with 4 additions and 2 deletions.
  1. +3 −1 stm/builder_file.go
  2. +1 −1 stm/consts.go
@@ -38,6 +38,8 @@ func (b *BuilderFile) Add(url interface{}) BuilderError {
URL{"host": b.loc.opts.defaultHost},
)

b.linkcnt++

smu, err := NewSitemapURL(b.opts, u)
if err != nil {
log.Fatalf("[F] Sitemap: %s", err)
@@ -50,7 +52,7 @@ func (b *BuilderFile) Add(url interface{}) BuilderError {
}

b.content = append(b.content, bytes...)
b.linkcnt++

return nil
}

@@ -10,7 +10,7 @@ const (
// MaxSitemapNews defines max news sitemap per index_file
MaxSitemapNews = 1000
// MaxSitemapFilesize defines file size for sitemap.
MaxSitemapFilesize = 10000000 // bytes
MaxSitemapFilesize = 50000000 // bytes
)

const (

0 comments on commit bd8f481

Please sign in to comment.
You can’t perform that action at this time.