base64url/base64url.go
func Decode(data string) ([]byte,error) {
	data = strings.Replace(data, "-", "+", -1) // 62nd char of encoding
	data = strings.Replace(data, "_", "/", -1) // 63rd char of encoding
	
	switch(len(data) % 4) { // Pad with trailing '='s
		case 0:             // no padding
		case 2: data+="=="  // 2 pad chars
		case 3:	data+="="   // 1 pad char		
	}
		
	return base64.StdEncoding.DecodeString(data)
}
func Decode(data string) ([]byte,error) {
	data = strings.Replace(data, "-", "+", -1) // 62nd char of encoding
	data = strings.Replace(data, "_", "/", -1) // 63rd char of encoding
	
	switch(len(data) % 4) { // Pad with trailing '='s
		case 0:             // no padding
		case 2: data+="=="  // 2 pad chars
		case 3:	data+="="   // 1 pad char		
	}
		
	return base64.StdEncoding.DecodeString(data)
}
func Decode ( data string ) ( [ ] byte , error ) { data = strings . Replace ( data , " " , " " , - 1 ) // 62nd char of encoding data = strings . Replace ( data , " " , " " , - 1 ) // 63rd char of encoding switch ( len ( data ) % 4 ) { // Pad with trailing '='s case 0 : // no padding case 2 : data += " " // 2 pad chars case 3 : data += " " // 1 pad char		 } return base64 . StdEncoding . DecodeString ( data ) }
// Decode decodes base64url string to byte array
Decode decodes base64url string to byte array