/* Copyright © 2024 Seednode */ package cmd import ( "fmt" "net/http" "strings" "time" ) func refreshInterval(r *http.Request) (int64, string) { interval := r.URL.Query().Get("refresh") duration, err := time.ParseDuration(interval) switch { case err != nil || duration == 0 || !Refresh: return 0, "0ms" case duration < 500*time.Millisecond: return 500, "500ms" default: return duration.Milliseconds(), interval } } func refreshFunction(rootUrl string, refreshTimer int64, nonce string) string { var htmlBody strings.Builder htmlBody.WriteString(fmt.Sprintf(``) return htmlBody.String() }