I have fetched details from database where couple of column were of sql.NullString
and sql.NullInt64
column.
Now, while I print them, after checking if it is Valid
, it prints data in {3 true}
format. I only want to print value 3
from it.
How can I achieve this?
Currently this is what, I am printing:
{{ range $value := .CatMenu }}
... // Other data
{{ $value.ParentID }} // This is sql.NullInt64 type
{{ end }}