I suspect your client isn't providing the required JSON body when making
the request. Try reading the body with `ioutil.ReadAll` before decoding
with `json.Unmarshal` so you can see exactly what's being provided.


On Wed, 15 Apr 2020 at 09:40, Ali Hassan <alidevelope...@gmail.com> wrote:

> So i will try with printf statement, to checkout what's the error , i had
> ...
>                 Error : EOF
>
> On Tuesday, April 14, 2020 at 6:53:32 PM UTC+5, Ali Hassan 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
>>
>> --
> 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/ac63cb0b-b640-49cb-a833-ae698f2c7e19%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/ac63cb0b-b640-49cb-a833-ae698f2c7e19%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAJhgachraRU7c2TpHgZ5YtZbVhVFF-NHNAourVxPAsSn_4ZAgQ%40mail.gmail.com.

Reply via email to