Hello!
If you want transpile from C to Golang, then you can use my project c4go.
Just for example, I take for example folder plan9port/src/cmd/troff.
Run c4go transpile -clang-flag="-I../../../include/" n*.c dw*.c t*.c.
As result we have Go file.
Some notes about transpilation:
not every C code can be transpiled to Go. For example, function getch from plan9port/src/cmd/troff/n1.c:409 have switch with goto between case.
pointer arithmetic look is not good in Go. For example this function:
Hello! If you want transpile from C to Golang, then you can use my project c4go. Just for example, I take for example folder
plan9port/src/cmd/troff
. Runc4go transpile -clang-flag="-I../../../include/" n*.c dw*.c t*.c
. As result we have Go file.Some notes about transpilation:
getch
fromplan9port/src/cmd/troff/n1.c:409
haveswitch
withgoto
betweencase
.So, if you need help, then please clarify. Fell free close that issue.
Konstantin