go - How to use OR operator properly in Golang -
How can I do this simple in Goalge
var planDate string date, ok: = Data ["date of appointment"] if! Ok {date of appointment = use Timestamp ()} and {planningDate = date} thanx
I do not see any way to do this in the same line, because there is no one in you | can not be used, either the operands numbers are not. However, here is a solution in three rows (assuming: date is only a temporary variable):
date of appointment, ok: = data ["planning Date "] if! OK {PlanDate = util.TimeStamp ()}
Comments
Post a Comment