Is ByteArrayInString encoding possible in Go?

I am trying to port this alternative Base64 encoding called ByteArrayInString to Go.

I have found Java and the original C# code, it is a pretty easy thing to convert the logic to Go.

What I am having an issue with is writing an equivalent Unit test.

The issue seems to be when converting the []byte to string it is not rendering each byte as a character and trying to convert them to unicode and just skipping the encoded characters.

The entire point of the exercise is to have a ASCII only compliant string. It kind of misses the point to have to covert each byte into a multi-byte rune to make a string out of them.

What am I missing?

Here is my attempt at porting the code as a Gist ByteArrayInString

And the test harness.

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)