Standard library / net/http/cookiejar

cookiejar.PublicSuffixList

Concurrency-safe interface for resolving public suffixes and describing the dataset. A nil list is not secure for general internet use; example shows interface configuration only. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
type PublicSuffixList interface {  PublicSuffix(domain string) string
  String() string}

Working Example

Example Snippetgo
package main
import (  "fmt"  "net/http/cookiejar")
func main() { var o cookiejar.Options; fmt.Println(o.PublicSuffixList == nil) }
func must[T any](v T, e error) T {  if e != nil {    panic(e)  }  return v}func check(e error) {  if e != nil {    panic(e)  }}
Go Reference