You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe. #249#248
Describe the solution you'd like
after generate main.go, before go run main.go, can add an optional process to use "goimports main.go", it can remove not used import.
Additional context
i wrote a litter tool gopick as an implementation for what i mentioned in #248 . it can really pick a
piece of go code, from a go project except, it will have unused imports. this could be easy fix by goimports (maybe most gopher has installed) before run main.go.
And With this, go's support will be really import level now, except some global init functions and variables that is go code's bad smell.
The text was updated successfully, but these errors were encountered:
soluty
changed the title
Add a pre process goimports for golang object before really run_string.
Add a pre process goimports for golang project before really run_string.
Sep 18, 2023
Nice stuff! I promise to look at it and do my best to make use of it in sniprun. How do you use it ? I can't really figure it out from the code only ?
Could you add a licence to the project so I can directly copy those files in sniprun? MIT or something similarly permissive would be good, since I don't want to rely on cloning a external repo at runtime
gopick project now only usefull for little go project, it has two main disadvantage.
if project is large, because of it should cal gopls bin, it will take a long time to pick really usefull code, for my project it will be one or two minute.
now gopick has not concern about which function has parameters.
now i am rewriting this work in lua, because i think it can reuse lsp server and make it more faster so that will be more usefull for large project. when i have done this , i will add a license let you can directly copy those files in sniprun.
Is your feature request related to a problem? Please describe.
#249 #248
Describe the solution you'd like
after generate main.go, before go run main.go, can add an optional process to use "goimports main.go", it can remove not used import.
Additional context
i wrote a litter tool gopick as an implementation for what i mentioned in #248 . it can really pick a
piece of go code, from a go project except, it will have unused imports. this could be easy fix by goimports (maybe most gopher has installed) before run main.go.
And With this, go's support will be really import level now, except some global init functions and variables that is go code's bad smell.
The text was updated successfully, but these errors were encountered: