Re: [go-nuts] What tool is used in Go Playground's import handling?

2023-10-20 Thread Ian Lance Taylor
On Thu, Oct 19, 2023 at 8:31 PM Pratik Tamgole  wrote:
>
> When I use packages, any packages in general, how does the import("fmt") line 
> correct itself to include the used packages in the program? What tool is 
> implemented here, I want to put the same in my editor.

https://pkg.go.dev/golang.org/x/tools/cmd/goimports

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcXh9sCOB4K9tjiDEwRrU3dprwbZHsSwkFq0H8vPQFi56Q%40mail.gmail.com.


Re: [go-nuts] What tool is used in Go Playground's import handling?

2023-10-19 Thread 'Christian Stewart' via golang-nuts
Hi,

https://pkg.go.dev/golang.org/x/tools/cmd/goimports

goimports -w ./

On Thu, Oct 19, 2023, 8:31 PM Pratik Tamgole 
wrote:

> When I use packages, any packages in general, how does the import("fmt")
> line correct itself to include the used packages in the program? What tool
> is implemented here, I want to put the same in my editor.
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/fbe12da2-c03e-4ff7-bf87-1207b483f89fn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CA%2Bh8R2ravGMwBWhSM6255%2BeG-vPQEf%2BfgxiHRaEX4ChNeF7otQ%40mail.gmail.com.