sniprun icon indicating copy to clipboard operation
sniprun copied to clipboard

Add a pre process goimports for golang project before really run_string.

Open soluty opened this issue 2 years ago • 3 comments

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.

soluty avatar Sep 18 '23 04:09 soluty