How to check if the payment field is empty?

I have created a program that is reading data from the file but now I need to show only that data where the payment field is not empty. How can I do that?

Can you include a sample of this file? What format is it: JSON, XML, CSV, …?

The file is CSV, but I am converting a data into the Float64.

OK. Please add this to your question so we can help you:

  • A sample of the file that contains cases where the payment field is empty or has a value.
  • The Go code you have tried to achieve the result you want.
1 Like

There is no “empty” data type in go. Nil? Empty string? 0 int? Please explain in more technical terms and as asked before, provide an example. This is not the first post where you ask for help while not providing any details. Help us to help you.

1 Like

Not sure about your scenario. But you can try to use package https://github.com/guregu/null

Example here https://repl.it/@luhonghai/example-read-csv

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