Skip to content

Instantly share code, notes, and snippets.

View arbel03's full-sized avatar
💭
main_v2_final_final_version-rev5-01_19-finished(1).py

arbel03

💭
main_v2_final_final_version-rev5-01_19-finished(1).py
View GitHub Profile
@icecrime
icecrime / gist:67399480c9a10b48fadc
Last active November 7, 2023 08:38
An experiment with Golang reflection and channels
package main
import (
"reflect"
"strings"
)
func makeChannel(t reflect.Type, chanDir reflect.ChanDir, buffer int) reflect.Value {
ctype := reflect.ChanOf(chanDir, t)
return reflect.MakeChan(ctype, buffer)