Standard library / go/parser
go/parser.Mode
Bit flags controlling parser depth, comments and diagnostics; combine using bitwise OR. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
type Mode uintWorking Example
Example Snippetgo
package main
import ( "fmt" "go/parser")
func main() { var m parser.Mode = parser.ParseComments | parser.SkipObjectResolution fmt.Println(m&parser.ParseComments != 0)}