go icon indicating copy to clipboard operation
go copied to clipboard

base64Codec: invalid input, error found in #10 byte of

Open klikpaspor opened this issue 5 years ago • 1 comments

This my code :

//TickerEth Charts
type TickerEth struct {
	Tickers []byte `json:"ticker"`
}

//Chart Realtime
func Chart(pair string) []byte {
	ticker, error := request.Get("https://indodax.com/api/ticker/" + pair)

	if error != nil {
		panic(error)
	}

	var tickers TickerEth
	var json = jsoniter.ConfigCompatibleWithStandardLibrary
	err := json.Unmarshal(ticker, &tickers)

	if err != nil {
		panic(err)
	}

	return tickers.Tickers
}

i'm got this error : panic: charts.TickerEth.Tickers: base64Codec: invalid input, error found in #10 byte of ...|{"ticker":{"high":"5|..., bigger context ...|{"ticker":{"high":"5178000","low":"5005000","vol_eth":"1180.|...

klikpaspor avatar Sep 22 '20 15:09 klikpaspor

I got the same issue. Does anyone know how to fix it?

hainguyenvinh avatar Sep 13 '22 13:09 hainguyenvinh