When parsing a string as text, I want any non-parseable string to result in a zero time and then carry on.
passwordLastUsed, err = time.Parse(time.RFC3339, record[lastUsed])
if err != nil {
err = nil
passwordLastUsed = time.Time{}
}
This code looks a bit messy and the 'ineffassign' linter returns this for the 'err = nil' statement:
warning: ineffectual assignment to err (ineffassign)
Is there a better way of handling this or should I just ignore the linter?