-
Notifications
You must be signed in to change notification settings - Fork 71
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
Conversation
accounting_test.go
Outdated
@@ -19,8 +19,12 @@ func init() { | |||
fmt.Printf("version: %s", runtime.Version()) | |||
} | |||
|
|||
func TestNewAccounting(t *testing.T) { | |||
|
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 :)
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? |
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? |
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 :) |
All right, I'll do it later, when I have time for it besides my other work. |
and prevent accounting.init() defaults on Accounting Objects from this two functions created
…rmats Update Readme Add Vendor correctly
So now all things are done. |
Cool! Thanks :) |
and prevent accounting.init() defaults on Accounting Objects from this two functions created