C# conversions attempt to make code visually similar to original Go code to make it easier to identity corresponding functionality.Instead conversions make things operate the way they do in Go, e.g., simply running a function on the current thread or running it in on the thread pool when using a goroutine. This means, for now, leaving out things like code conversions into async functions. Code conversions focus first on making sure C# code runs as behaviorally similar to Go code as possible.Convert Go code into behaviorally and visually similar C# code – see conversion strategies.Convert Go code into C# so that Go code can be directly used within.Recent example usages of go2cs allow the use of Golang as the scripting language for the Unity and Godot game engine platforms. Also added an experimental sstring which is a ref struct implementation of a Go string.Ĭode conversions now better match original Go code styling This should make Go strings faster since strings do not have to be converted to UTF8 from UTF16. String literals are encoded using UTF-8 (C# u8 string suffix) which uses ReadOnlySpan ref struct. Go2cs | Golang to C# Converter go2cs Golang to C# Converter Home View on GitHubĬonverts source code developed using the Go programming language (see Go Language Specification) to the C# programming language (see C# Language Specification).