[Solved] what is the mean chan word in struct definition in golang [closed]


The list inside the struct { ... } is the list of field declarations. The Protocol field at the top is an embedded field declaration. The rest is declared using the <FieldName> <FieldType> format. For example closed <-chan struct{} is a field named closed whose type is <-chan struct{} (a receive-only channel whose element type is the empty-struct). And werr chan<- error is a field named werr of type chan<- error (a send-only channel whose element type is error).

solved what is the mean chan word in struct definition in golang [closed]