-
Notifications
You must be signed in to change notification settings - Fork 209
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
Restructure #24
base: master
Are you sure you want to change the base?
Restructure #24
Conversation
Thanks for restructuring this! I agree that it would be preferable for us to match the way gofmt is laid out. One thing that we want to be able to do that gofmt does not, however, (and which gofmt probably should) is allow the ability to import the key functionality as a package into a different application (not just this one). There was a pull request recently that added this change, so there's at least one person who has this use case. Fortunately I think it should be easy for us to adapt your changes this way; I think we just need to move the files that aren't |
Oh, as for outputting the flag by default, the idea is that it makes it easier to use gojson from go generate. Is there a reason that omitting the package is preferable for your workflow? |
That's a good point. I updated the package name so it's importable. I haven't used go generate. Do you have any examples I can play with? |
I removed the change to suppress outputting package by default, so it's back to the original functionality. I also couldn't think of a nice way to structure this so that it's both a library for people to import, and an executable to use, so I made a post in golang-nuts to see what other people would think. |
okay, updated per Matt's comment in the golang-nuts group (link in previous comment) Let me know what you think |
ping? |
I restructured a little to make it closer to how gofmt is structured: https://golang.org/src/cmd/gofmt/
Added a doc.go as well
I prefer not having it out the package by default, but it's still a possible flag. Maybe this one is more opinion based.
let me know what you think