You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The value for the direction of a bidirectional channel isn't defined in the go/ast package [1]. The parser method,(*go/ast.parser).parseChanType, uses ast.SEND | ast.RECV as a substitute.
The proposal is to either:
Declare a constant in package ast: BOTH = SEND | RECV; or
Document in package ast that a bidirectional channel's direction has the value SEND | RECV.
Either option will provide a documented value that clients of package ast can use.
This should be a simple documentation fix. ChanDir is intended as a bit mask, shown by SEND's and RECV's definition as 1 << iota, but ChanDir's documentation says that "The direction of a channel type is indicated by one of the following constants".
The value for the direction of a bidirectional channel isn't defined in the
go/ast
package [1]. The parser method,(*go/ast.parser).parseChanType
, usesast.SEND | ast.RECV
as a substitute.The proposal is to either:
BOTH = SEND | RECV
; orSEND | RECV
.Either option will provide a documented value that clients of package ast can use.
[1] https://tip.golang.org/pkg/go/ast/#ChanDir
The text was updated successfully, but these errors were encountered: