Space Cat, Prince Among Thieves

Text to "Go String" Tool

Go currently lacks any sort of heredoc or similar syntax, and it's backtick syntax cannot contain backticks. This can make correctly encoded creating go strings, particularly for large strings that contain many backticks, a bit of a challenge.

Here's a tool to safely encode any given input to Go string. It's written in Go using Go's own string encoder and compiled with WASM.

The code as well as a CLI version of it are available on GitHub.

Fork my source on GitHub!


Email address will never be publicly visible.

Basic HTML allowed.