Skip to content

Commit

Permalink
fix randomAd
Browse files Browse the repository at this point in the history
  • Loading branch information
yelizariev committed Jul 20, 2024
1 parent 05206e7 commit 40c99ca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ import (
html_template "html/template"
"io"
"log"
"math/rand"
"net/http"
"path/filepath"
"runtime"
"strings"
text_template "text/template"
"time"

"github.com/itpp-labs/hound/config"
)
Expand Down Expand Up @@ -179,6 +181,8 @@ func renderForPrd(w io.Writer, c *content, cfg *config.Config, cfgJson string, i
}
buf.WriteString("</script>")

var randomAd string // Initialize randomAd with an empty string

if cfg.Ads != nil && len(cfg.Ads) > 0 {
// Seed the random number generator (typically done once)
rand.Seed(time.Now().UnixNano())
Expand Down

0 comments on commit 40c99ca

Please sign in to comment.