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

Tweaking the output package name would be useful #20

Open
ghost opened this issue Jul 8, 2021 · 6 comments
Open

Tweaking the output package name would be useful #20

ghost opened this issue Jul 8, 2021 · 6 comments

Comments

@ghost
Copy link

ghost commented Jul 8, 2021

Could you please add package name as parameter to GenerateContainer func ? Like:

func GenerateContainer(provider Provider, outputDirectory, packageName string) error

or

func GenerateContainer(provider Provider, packageName, outputDirectory string) error
@sarulabs
Copy link
Owner

sarulabs commented Jul 9, 2021

Can you tell me if it is what you want ?
#22
Files will be generated in {outputDirectory}/{pkgName}.

@ghost
Copy link
Author

ghost commented Jul 9, 2021

@sarulabs yes!

@sarulabs
Copy link
Owner

sarulabs commented Jul 9, 2021

The code was merged and the feature can now be used in v4.1.0.

@ghost
Copy link
Author

ghost commented Jul 9, 2021

@sarulabs maybe updating the code generation example in the README.md would be a good idea too.

@sarulabs
Copy link
Owner

sarulabs commented Jul 9, 2021

I updated the documentation on master (#23).

@ghost
Copy link
Author

ghost commented Jul 10, 2021

A side note on documentations.

I noticed that only Fill and UnscopedFill functions make use of reflection internally to resolve instances. I think this should be mentioned in bold on sarulabs/di and sarulabs/dingo repo homepages, because the container makes use of reflection sparingly and most retrieval functions are suitable for use in hot paths.

Had I seen that mentioned in the docs, I would have skipped testing about a dozen of other libraries before picking the DIC library for my stack.

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