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

Does cell.Bool behave properly? #106

Closed
ShawnMilo opened this issue Apr 18, 2015 · 2 comments
Closed

Does cell.Bool behave properly? #106

ShawnMilo opened this issue Apr 18, 2015 · 2 comments

Comments

@ShawnMilo
Copy link
Collaborator

func (c *Cell) Bool() bool { just returns c.Value == "1".

Given that there is a CellType CellTypeBool, should it check that and use c.Value == "1" if so, and otherwise return false for "" (empty string) and true for anything else?

ShawnMilo added a commit that referenced this issue Apr 18, 2015
Change the behavior of Cell.Bool to be technically more correct.
@ShawnMilo
Copy link
Collaborator Author

Note: Branch with update and tests pushed. No existing tests were harmed. However, there weren't yet any tests for the boolean cell type.

This could affect users in a backwards-incompatible way, but I believe it would only bring unexpected data to their attention, preventing the silent consumption of bad data.

ShawnMilo added a commit that referenced this issue May 13, 2015
Change the behavior of Cell.Bool to be technically more correct.
@ShawnMilo
Copy link
Collaborator Author

Closed by PR #112.

tealeg pushed a commit that referenced this issue Apr 1, 2016
Change the behavior of Cell.Bool to be technically more correct.
tealeg pushed a commit that referenced this issue Jan 14, 2020
Change the behavior of Cell.Bool to be technically more correct.
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

No branches or pull requests

1 participant