reflect.MakeChan() Function in Golang with Examples
Go language provides inbuilt support implementation of run-time reflection and allowing a program to manipulate objects with arbitrary types with the help of reflect package. The reflect.MakeChan() Function in Golang is used to create a new channel with the specified type and buffer size. To access this function, one needs to imports the reflect package in the program.
Syntax:func MakeChan(typ Type, buffer int) Value
Parameters: This function takes only two parameters of Type type(typ) and int type (buffer).
Return Value: This function returns the newly created channel.
Below examples illustrate the use of above method in Golang:
Value : 0xc00005e060
Type : [chan] Capacity :