Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inverted logic in EpochTime #12

Closed
sbinet opened this issue Feb 12, 2018 · 0 comments · Fixed by #14
Closed

inverted logic in EpochTime #12

sbinet opened this issue Feb 12, 2018 · 0 comments · Fixed by #14
Assignees

Comments

@sbinet
Copy link
Contributor

sbinet commented Feb 12, 2018

in epoch_time.go, one can see:

secs, err := strconv.ParseInt(string(b), 0, 64)

	secs, err := strconv.ParseInt(string(b), 0, 64)
	if err == nil {
		t.Time = time.Time{}
		return nil
	}
  • the condition in the if should probably be err != nil
  • one should probably return the err error as well (instead of nil)
sbinet added a commit to sbinet-alt63/openfoodfacts-go that referenced this issue Feb 12, 2018
@Areontar Areontar self-assigned this Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants