Standard library / go/doc

go/doc.IllegalPrefixes

List of prefixes that suppress misleading synopsis text such as copyright notices. Avoid mutating shared state. Expected stdout: 'true true\n'.

Formal Syntax & Structure

go syntaxgo
var IllegalPrefixes []string

Working Example

Example Snippetgo
package main
import (  "fmt"  "go/doc")
func main() { fmt.Println(len(doc.IllegalPrefixes) > 0, doc.Synopsis("Copyright 2024. Text.") == "") }
Go Reference