Standard library / go/types

go/types.SendOnly

Send-only channel direction. Expected stdout: 'chan<- int\n'.

Formal Syntax & Structure

go syntaxgo
const SendOnly ChanDir = 1

Working Example

Example Snippetgo
package main
import (  "fmt"  "go/types")
func main() { fmt.Println(types.NewChan(types.SendOnly, types.Typ[types.Int])) }
Go Reference