Looking for a tiny go/golang snippet to connect to bitcoin core json rpc
Ah... got there myself taking things from multiple sources!
Here's the code snippet:

package main

import (
    "fmt"
    "io/ioutil"
    "net/http"
    "strings"
)

func main() {
    testRequest := `{"jsonrpc": "1.0", "id":"", "method": "getrpcinfo", "params": []}`

    req, _ := http.NewRequest("POST", "http://127.0.0.1:8332/", strings.NewReader(testRequest))
    req.SetBasicAuth("", "notmypassword")
    req.Header.Add("content-type", "text/plain;")

    res, e := http.DefaultClient.Do(req)
    if e != nil {
        fmt.Println(e)
    } else {
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
        fmt.Println(string(body))
    }
}