Q:

Golang Base64 to Hex conversion

Why does Golang base64 to Hex produce a different encoding value than the online converter?
Original String:

ARVIN  

Base64 encoded:

QVJWSU4=  

Golang (base64 to hex):

51564a575355343d  

Online (base64 to hex):

415256494e

package main

import (
    "encoding/hex"
    "fmt"
)

func main() {

    base64 := "QVJWSU4="
    hx := hex.EncodeToString([]byte(base64))
    fmt.Println("Original String: ARVIN")
    fmt.Println()
    fmt.Println(base64 + " ==> " + hx)
}

A:

You can convert the un-encoded value directly to hex:
h := hex.EncodeToString([]byte("ARVIN"))
fmt.Println(h) // prints 415256494e

Given the program starts with the base64 encoding, the program must decode the base64 string to bytes and then encode the bytes to a hex string. This is what the online tool does. 
The code in the question encodes the base64 string to a hex string. It's missing the decode step.
Here's how to re-encode base64 to hex in Go:
p, err := base64.StdEncoding.DecodeString("QVJWSU4=")
if err != nil {
    // handle error
}
h := hex.EncodeToString(p)
fmt.Println(h) // prints 415256494e

Run it in the playground.

