Standard library / go/ast

go/ast.ChanDir

Bit flags identifying send and receive permissions for a ChanType. Expected stdout: 'true true\n'.

Formal Syntax & Structure

go syntaxgo
type ChanDir int

Working Example

Example Snippetgo
package main
import (  "fmt"  "go/ast")
func main() { var d ast.ChanDir = ast.SEND | ast.RECV; fmt.Println(d&ast.SEND != 0, d&ast.RECV != 0) }
Go Reference