hi,I try the code:
import os
import my_module
---above code is compiled
import (
os
my_module
)
---with (),get an error:bad import format
but const is different:
const PI=3.14
---without(),get an error:expected ( but got PI
const (
A=1
B=2
)
---with () code is compiled
import (
os
my_module
)
is incorrect syntax at the moment, it shouldn't compile
Will it, in the future?
Yes.
I don't like having 2 different ways to do imports, so most likely this will be handled by vfmt. If there's only one import, then it's converted to import module, otherwise it's converted to
import (
a
b
c
)
Fixed.
Most helpful comment
Yes.
I don't like having 2 different ways to do imports, so most likely this will be handled by vfmt. If there's only one import, then it's converted to
import module, otherwise it's converted to