OMG, it was my *test* that was modifying the value... Thanks so much for 
your time

On Monday, April 6, 2020 at 4:24:10 PM UTC+10, Jakob Borg wrote:
>
> Hi Shane, 
>
> This doesn't happen with your example: 
> https://play.golang.org/p/C3zb6Qyx-2f
>
> Can you provide a small example of when it does happen?
>
> //jb
>
> On 6 Apr 2020, at 08:03, Shane H <sha...@gmail.com <javascript:>> wrote:
>
> I know that it's documented that the json encoder will produce base64 "Array 
> and slice values encode as JSON arrays, except that []byte encodes as a 
> base64-encoded string", but I am getting a base64 response when I pass in 
> a string
>
> response := []string 
> response = append(response, "
> http://localhost:10000/obscured/media/f7/c3/e6/a74f71b64712bf11af31b2d027dadbe41f63313103d14a528043d66173
> ")
>
> w.WriteHeader(http.StatusCreated)
> if err := json.NewEncoder(w).Encode(response); err != nil{
>     // handle error
> }
>
> Will produce the base64 equivalent of the URL, instead of json.
>
> Given that every time I have asked for help on this list I have discovered 
> that it's something that I am doing wrong, I do NOT mind if someone 
> helpfully points me toward the documentation I am misreading
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golan...@googlegroups.com <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/4e145a21-52cb-4393-bda0-b11d11a471ed%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/golang-nuts/4e145a21-52cb-4393-bda0-b11d11a471ed%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/ed5fba21-594d-4952-9937-c08182d43433%40googlegroups.com.

Reply via email to