sql.NullTime not supported in Linux

I have used sql.NullTime to handle null values from the database in the windows version. But for Linux version go compiler thows an error that sql.NullTime is not defined. Is sql package different from windows to linux

2 Likes

It is defined here:

https://golang.org/src/database/sql/sql.go?s=8120:8210#L308

That file does not have any build constraints that I could see, so it should be there on linux and windows and mac without any further issues.

Perhaps you can show the code that does not work as expected?

3 Likes

Sorry It’s my mistake…I just found it…Thankyou

2 Likes

How did solve your issue? Please can you give us more info about your the solve way?

2 Likes

First when I tried to run the program I was facing an issue sql.NullTime is defined.
So i raised an issue. But suddenly when I check the version and I found that I was using go1.13 version on windows and go1.12 version on linux. So I downloaded the 1.13 version of go and checked the sql package then I found the code for sql.NullTime.

2 Likes

I am glad to you could solve your the problem.

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.