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

fix: fix comment disappear when missing import #34

Merged
merged 1 commit into from
Feb 12, 2022

Conversation

danie1Lin
Copy link

Need to add parse comment options, or all comments will disappear when the file is missing imports.

need to add parse comment options
@bootun
Copy link
Collaborator

bootun commented Feb 11, 2022

that's cool! at least this is my thought. but I'm not sure if it's necessary. I will inform the owner that you can get a reply faster :-)

@danie1Lin
Copy link
Author

danie1Lin commented Feb 11, 2022

I think it is necessary because not only the comments I add will disappear (not in _gen.go subfix file, I comment in pkg/http/handler.go ), the comments generated from kit CLI also disappear. If you add another function again, only the comments of the new function will be generated.

@bootun
Copy link
Collaborator

bootun commented Feb 11, 2022

you are right, just wait for the owner's approval.

@danie1Lin
Copy link
Author

Thank you. :)
Let me provide the reproducing step:

  1. add new function in the service interface
  2. delete an import library from pkg/http/handler.go (we encounter it when use the http mux first and turn to gorilla mux, so CLI think I need a github.com/gorilla/handlers library)
  3. run kit g s service --gorilla --dmw
    It will all disappear.

@GrantZheng GrantZheng merged commit 30e86fc into GrantZheng:master Feb 12, 2022
@danie1Lin danie1Lin deleted the fix/comment-disappear branch February 12, 2022 02:53
@danie1Lin danie1Lin restored the fix/comment-disappear branch March 14, 2022 17:28
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