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

Avoid having a big big file #17

Merged
merged 2 commits into from
Sep 18, 2017
Merged

Conversation

ZaniaDeveloper
Copy link
Contributor

Fix up issue #13.

Add -split option to avoid generating big file.

@shuLhan
Copy link
Owner

shuLhan commented Sep 15, 2017

I will merge this until I figure it out how to to test it.

convert.go Outdated
if c.Debug || c.Dev {
err = writeDebug(bfd, c, toc)
if c.Split {
return translateToDir(c, toc, wd)
} else {
Copy link
Owner

Choose a reason for hiding this comment

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

Remove unneeded else.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, i know cause the return.


func generateCommonFile(c *Config, toc []Asset) error {
// Create output file.
fd, err := os.Create(filepath.Join(c.Output, "common.go"))
Copy link
Owner

Choose a reason for hiding this comment

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

I prefer to use bindata.go as the common file, to minimize conflict if user want to generate to directory that has the common.go (since -split now assume output as dir, user can not change the output file name.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, u're right, it's better.

@shuLhan shuLhan merged commit 94068b1 into shuLhan:master Sep 18, 2017
@shuLhan
Copy link
Owner

shuLhan commented Sep 18, 2017

Thank you @ZaniaDeveloper @corebreaker .

@ZaniaDeveloper ZaniaDeveloper deleted the 13-split-file branch September 18, 2017 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants