File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 11module github.com/koonix/go-livereload
22
3- go 1.24
3+ // Require 1.22+ to benefit from the for-loop changes.
4+ // https://tip.golang.org/doc/go1.22#language
5+ go 1.22
6+
7+ // Use 1.24+ so we can use the runtime.AddCleanup function.
8+ // https://tip.golang.org/doc/go1.24#improved-finalizers
9+ toolchain go1.24.0
410
511require golang.org/x/net v0.35.0
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ func scriptNonceAttrs(h http.Header) []html.Attribute {
204204// cspScriptNonce parses a "Content-Security-Policy" http header value
205205// and extracts the script-src nonce value from it if available.
206206func cspScriptNonce (csp string ) string {
207- for segment := range strings .SplitSeq (csp , ";" ) {
207+ for _ , segment := range strings .Split (csp , ";" ) {
208208fields := strings .Fields (segment )
209209if len (fields ) < 2 { // This also skips empty slices, preventing panic.
210210continue
You can’t perform that action at this time.
0 commit comments