On Tue, Apr 14, 2020 at 7:54 AM Ali Hassan <alidevelope...@gmail.com> wrote: > > dec :=json.NewDecoder(request.Body)//ok > var visitor db.Visitor > err := dec.Decode(&visitor);if err!= nil{ print("error", err) // throw this > error } println("data:", visitor.Id) > > When I compile my code it throw error like this 0xc54f40 , 0xc000032070. > Please help me
Do not use print to print messages. That's an internal function. Use fmt.Printf, it should tell you the error. > > -- > 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/e724c659-e523-4ff5-b0df-ce0b4fd42773%40googlegroups.com. -- 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/CAMV2RqrBUjMm4QxLNiKDGKM9Y%3Dj6Ze_c8XfaihsiwGmT0dWFuQ%40mail.gmail.com.