Skip to content

Add Function DefaultAccounting and NewAccounting #11

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

Merged
merged 4 commits into from
Apr 10, 2018

Conversation

Dexus
Copy link
Contributor

@Dexus Dexus commented Apr 7, 2018

and prevent accounting.init() defaults on Accounting Objects from this two functions created

@coveralls
Copy link

coveralls commented Apr 7, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 27e0506 on DeineAgenturUG:dev3 into d70d04f on leekchan:master.

@@ -19,8 +19,12 @@ func init() {
fmt.Printf("version: %s", runtime.Version())
}

func TestNewAccounting(t *testing.T) {

Copy link
Owner

Choose a reason for hiding this comment

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

Hm... This test contains empty body. Is this PR in progress?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, sorry I did add the Checks in TestFormatMoney.

Copy link
Owner

Choose a reason for hiding this comment

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

Okay. Please remove this empty test :)

@leekchan
Copy link
Owner

leekchan commented Apr 9, 2018

Thanks for your PR. Do you think the new functions are more convenient than the struct-based initialization? I think the struct-based initialization is more intuitive. What do you think?

@Dexus
Copy link
Contributor Author

Dexus commented Apr 9, 2018

Yes, the new functions are better suited than the structure-based initialization. Both are still possible, but I think it is better to create the objects from the structure with a function. If desired, methods should also be defined to overwrite the "defaults". Because in some countries a space is desired as a thousand separator.

What do you think?

@leekchan
Copy link
Owner

leekchan commented Apr 9, 2018

Okay. It seems to be reasonable 👍 Could you also add some use cases of the new functions in the readme & godoc? (such as using the empty string separator (#8), or something you want)

Thanks :)

@Dexus
Copy link
Contributor Author

Dexus commented Apr 9, 2018

All right, I'll do it later, when I have time for it besides my other work.

Josef Fröhle added 4 commits April 9, 2018 10:53
and prevent accounting.init() defaults on Accounting Objects from this two functions created
@Dexus
Copy link
Contributor Author

Dexus commented Apr 9, 2018

So now all things are done.

@leekchan leekchan merged commit 644c117 into leekchan:master Apr 10, 2018
@leekchan
Copy link
Owner

Cool! Thanks :)

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.

3 participants