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

Create entry in dnote file on use. #20

Merged
merged 1 commit into from
Apr 23, 2017
Merged

Create entry in dnote file on use. #20

merged 1 commit into from
Apr 23, 2017

Conversation

michielboekhoff
Copy link
Contributor

This should fix #2. Whenever the user invokes use, a new book entry is created (if it doesn't already exist!).

// Now add this book to the .dnote file, for issue #2
dnote, err := utils.GetDnote()
if err != nil {
return err
Copy link

@zacoid55 zacoid55 Apr 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering, does this work the same as in Ruby where you can use the contents of the statement as a more of a guard clause and do something along the lines of: return err if err != nil ?

If so - could this then be used on the same single claused if statements

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To the best of my knowledge, no.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough :D

@michielboekhoff michielboekhoff changed the title use now creates a new book entry in the Dnote file. Create entry in dnote file on use. Apr 21, 2017
@sungwoncho sungwoncho merged commit ed3827a into dnote:master Apr 23, 2017
@sungwoncho
Copy link
Member

LGTM. Let's release in 0.1.0.beta-2

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 this pull request may close these issues.

Show books even if they have no notes
3 participants