hexops / valast

Convert Go values to their AST
Other
308 stars 16 forks source link

Very basic channel and function type handling #24

Closed nicknewland-dev closed 1 year ago

nicknewland-dev commented 1 year ago

Valast has been great, but I have several places where I need it to handle channel or function types gracefully and not just return an error. I have created some very, very basic handling for those types that just converts the channel or function to a basic literal which writes out the type and address of the value.

slimsag commented 1 year ago

Sorry, but functions and channels are generally out of scope. Valast is used to generate valid Go code, and is used by many to actually write Go code back into a Go source file. The address of the value is not valid for this use case.