Repository: goplus/gop
Pull request #1489 (2023-10-23 22:29:33)

update gox version


Patch:
diff --git a/cl/compile.go b/cl/compile.go
index 1b06ed91..38e9aff0 100644
--- a/cl/compile.go
+++ b/cl/compile.go
@@ -382,17 +382,12 @@ type pkgCtx struct {
 	inInst   int             // toType in generic instance
 }
 
-type pkgImp struct {
-	*gox.PkgRef
-	pkgName *types.PkgName
-}
-
 type blockCtx struct {
 	*pkgCtx
 	pkg          *gox.Package
 	cb           *gox.CodeBuilder
 	fset         *token.FileSet
-	imports      map[string]pkgImp
+	imports      map[string]*gox.PkgRef
 	lookups      []*gox.PkgRef
 	clookups     []*cpackages.PkgRef
 	tlookup      *typeParamLookup
@@ -413,8 +408,8 @@ func (bc *blockCtx) recorder() Recorder {
 	return nil
 }
 
-func (bc *blockCtx) findImport(name string) (pi pkgImp, ok bool) {
-	pi, ok = bc.imports[name]
+func (bc *blockCtx) findImport(name string) (pr *gox.PkgRef, ok bool) {
+	pr, ok = bc.imports[name]
 	return
 }
 
@@ -570,7 +565,7 @@ func NewPackage(pkgPath string, pkg *ast.Package, conf *Config) (p *gox.Package,
 		ctx := &blockCtx{
 			pkg: p, pkgCtx: ctx, cb: p.CB(), fset: p.Fset, targetDir: targetDir,
 			fileLine: fileLine, relativePath: conf.RelativePath, isClass: f.IsClass, rec: conf.Recorder,
-			c2goBase: c2goBase(conf.C2goBase), imports: make(map[string]pkgImp), isGopFile: true,
+			c2goBase: c2goBase(conf.C2goBase), imports: make(map[string]*gox.PkgRef), isGopFile: true,
 		}
 		preloadGopFile(p, ctx, fpath, f, conf)
 	}
@@ -581,7 +576,7 @@ func NewPackage(pkgPath string, pkg *ast.Package, conf *Config) (p *gox.Package,
 		gofiles = append(gofiles, f)
 		ctx := &blockCtx{
 			pkg: p, pkgCtx: ctx, cb: p.CB(), fset: p.Fset, targetDir: targetDir,
-			imports: make(map[string]pkgImp),
+			imports: make(map[string]*gox.PkgRef),
 		}
 		preloadFile(p, ctx, fpath, f, false, false)
 	}
@@ -1149,25 +1144,21 @@ func loadImport(ctx *blockCtx, spec *ast.ImportSpec) {
 	} else {
 		pkg = ctx.pkg.Import(simplifyGopPackage(pkgPath), spec)
 	}
-
-	var pos token.Pos
 	var name string
+	var pos token.Pos
 	var specName = spec.Name
-	if specName != nil {
-		name, pos = specName.Name, specName.Pos()
-	} else {
-		name, pos = pkg.Types.Name(), spec.Path.Pos()
-	}
-	pkgName := types.NewPkgName(pos, ctx.pkg.Types, name, pkg.Types)
 	if rec := ctx.recorder(); rec != nil {
-		if specName != nil {
-			rec.Def(specName, pkgName)
-		} else {
-			rec.Implicit(spec, pkgName)
-		}
+		defer func() {
+			pkgName := types.NewPkgName(pos, ctx.pkg.Types, name, pkg.Types)
+			if specName != nil {
+				rec.Def(specName, pkgName)
+			} else {
+				rec.Implicit(spec, pkgName)
+			}
+		}()
 	}
-
 	if specName != nil {
+		name, pos = specName.Name, specName.NamePos
 		if name == "." {
 			ctx.lookups = append(ctx.lookups, pkg)
 			return
@@ -1176,8 +1167,10 @@ func loadImport(ctx *blockCtx, spec *ast.ImportSpec) {
 			pkg.MarkForceUsed()
 			return
 		}
+	} else {
+		name, pos = pkg.Types.Name(), spec.Path.Pos()
 	}
-	ctx.imports[name] = pkgImp{pkg, pkgName}
+	ctx.imports[name] = pkg
 }
 
 func loadConstSpecs(ctx *blockCtx, cdecl *gox.ConstDefs, specs []ast.Spec) {
diff --git a/cl/expr.go b/cl/expr.go
index 83a62447..8e24089a 100644
--- a/cl/expr.go
+++ b/cl/expr.go
@@ -119,11 +119,12 @@ func compileIdent(ctx *blockCtx, ident *ast.Ident, flags int) (obj *gox.PkgRef,
 		if name == "C" && len(ctx.clookups) > 0 {
 			return nil, objCPkgRef
 		}
-		if pi, ok := ctx.findImport(name); ok {
+		if pr, ok := ctx.findImport(name); ok {
 			if rec := ctx.recorder(); rec != nil {
-				rec.Use(ident, pi.pkgName)
+				pkgName := types.NewPkgName(ident.NamePos, ctx.pkg.Types, name, pr.Types)
+				rec.Use(ident, pkgName)
 			}
-			return pi.PkgRef, objPkgRef
+			return pr, objPkgRef
 		}
 	}
 
diff --git a/cl/func_type_and_var.go b/cl/func_type_and_var.go
index 9a734d47..053bc1be 100644
--- a/cl/func_type_and_var.go
+++ b/cl/func_type_and_var.go
@@ -194,12 +194,13 @@ func toChanType(ctx *blockCtx, v *ast.ChanType) *types.Chan {
 func toExternalType(ctx *blockCtx, v *ast.SelectorExpr) types.Type {
 	id := v.X.(*ast.Ident)
 	name := id.Name
-	if pi, ok := ctx.findImport(name); ok {
+	if pr, ok := ctx.findImport(name); ok {
 		rec := ctx.recorder()
 		if rec != nil {
-			rec.Use(id, pi.pkgName)
+			pkgName := types.NewPkgName(id.NamePos, ctx.pkg.Types, name, pr.Types)
+			rec.Use(id, pkgName)
 		}
-		o := pi.TryRef(v.Sel.Name)
+		o := pr.TryRef(v.Sel.Name)
 		if t, ok := o.(*types.TypeName); ok {
 			if rec != nil {
 				rec.Use(v.Sel, t)
diff --git a/go.mod b/go.mod
index 43f1148f..6ef782d6 100644
--- a/go.mod
+++ b/go.mod
@@ -3,9 +3,9 @@ module github.com/goplus/gop
 go 1.18
 
 require (
-	github.com/fsnotify/fsnotify v1.7.0
+	github.com/fsnotify/fsnotify v1.6.0
 	github.com/goplus/c2go v0.7.16
-	github.com/goplus/gox v1.12.2-0.20231020202641-5f657ff4e754
+	github.com/goplus/gox v1.12.2-0.20231023222557-3d1b2e0a7dbf
 	github.com/goplus/mod v0.11.8-0.20231019172744-da5848421263
 	github.com/qiniu/x v1.13.1
 	golang.org/x/tools v0.14.0
diff --git a/go.sum b/go.sum
index cf76739d..fcaadb34 100644
--- a/go.sum
+++ b/go.sum
@@ -1,14 +1,14 @@
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
-github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
+github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
+github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
 github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 github.com/goplus/c2go v0.7.16 h1:B9jRNNytoq7yDBQOZSm2qENQhRQMfNhgOea5XHWNUnI=
 github.com/goplus/c2go v0.7.16/go.mod h1:XODEFX2PeEEJXNLLdykWeZgMSaKJ51fVm+C9IM3FxNQ=
 github.com/goplus/gox v1.12.1/go.mod h1:wymoQJ7ydd42cTlaXb4wNbvn4LlKjR+j8PZehI7v1zQ=
-github.com/goplus/gox v1.12.2-0.20231020202641-5f657ff4e754 h1:uuXDqFfg4RhmHD7slw15hzwVQtJ51CsdcZn6gQtve/E=
-github.com/goplus/gox v1.12.2-0.20231020202641-5f657ff4e754/go.mod h1:Ek1YIy3wRaZ1i0DD2XG29i3r5AFdhcOradK0/GGs1YQ=
+github.com/goplus/gox v1.12.2-0.20231023222557-3d1b2e0a7dbf h1:gQNKxSMyYDdOFNpfqZfWjVZE5q/MsZmqn2rJ3U+OvA8=
+github.com/goplus/gox v1.12.2-0.20231023222557-3d1b2e0a7dbf/go.mod h1:Ek1YIy3wRaZ1i0DD2XG29i3r5AFdhcOradK0/GGs1YQ=
 github.com/goplus/mod v0.11.5/go.mod h1:NDC5E+XOT8vcJCMjqKhLDJHTHX7lyVN4Vbfi2U7dBhs=
 github.com/goplus/mod v0.11.8-0.20231019172744-da5848421263 h1:PE0HveOss5mai9pa52L4/ZvVqZtltogJ9rIUIsdlG/I=
 github.com/goplus/mod v0.11.8-0.20231019172744-da5848421263/go.mod h1:yl2QncBKTdXk+8UaNsdo4u2zSpGEJYA5JKjgD3K2h00=
@@ -51,6 +51,7 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=


Test patch:
diff --git a/cl/compile_c2go_test.go b/cl/compile_c2go_test.go
index c20edcc9..8bf5199c 100644
--- a/cl/compile_c2go_test.go
+++ b/cl/compile_c2go_test.go
@@ -35,8 +35,8 @@ C.printf C"Hello, world!\n"
 `, `package main
 
 import (
-	libc "github.com/goplus/gop/cl/internal/libc"
-	unsafe "unsafe"
+	"github.com/goplus/gop/cl/internal/libc"
+	"unsafe"
 )
 
 func main() {
@@ -53,8 +53,8 @@ C.printf C"Hello, world!\n"
 `, `package main
 
 import (
-	libc "github.com/goplus/gop/cl/internal/libc"
-	unsafe "unsafe"
+	"github.com/goplus/gop/cl/internal/libc"
+	"unsafe"
 )
 
 func main() {
@@ -71,8 +71,8 @@ C.printf C"Hello, world!\n"
 `, `package main
 
 import (
-	libc "github.com/goplus/gop/cl/internal/libc"
-	unsafe "unsafe"
+	"github.com/goplus/gop/cl/internal/libc"
+	"unsafe"
 )
 
 func main() {
diff --git a/cl/compile_spx_test.go b/cl/compile_spx_test.go
index 1fe31d87..28e0fd71 100644
--- a/cl/compile_spx_test.go
+++ b/cl/compile_spx_test.go
@@ -164,7 +164,7 @@ func onMsg(msg string) {
 }
 `, `package main
 
-import spx "github.com/goplus/gop/cl/internal/spx"
+import "github.com/goplus/gop/cl/internal/spx"
 
 type Game struct {
 	*spx.MyGame
@@ -211,8 +211,8 @@ func onInit() {
 `, ``, `package main
 
 import (
-	fmt "fmt"
-	spx "github.com/goplus/gop/cl/internal/spx"
+	"fmt"
+	"github.com/goplus/gop/cl/internal/spx"
 )
 
 const Foo = 1
@@ -248,8 +248,8 @@ func onInit() {
 `, `package main
 
 import (
-	spx "github.com/goplus/gop/cl/internal/spx"
-	math "math"
+	"github.com/goplus/gop/cl/internal/spx"
+	"math"
 )
 
 type Game struct {
@@ -301,7 +301,7 @@ func onCloned() {
 }
 `, `package main
 
-import spx "github.com/goplus/gop/cl/internal/spx"
+import "github.com/goplus/gop/cl/internal/spx"
 
 type Game struct {
 	*spx.MyGame
@@ -341,8 +341,8 @@ println "Hi"
 `, `package main
 
 import (
-	fmt "fmt"
-	spx "github.com/goplus/gop/cl/internal/spx"
+	"fmt"
+	"github.com/goplus/gop/cl/internal/spx"
 )
 
 var x float64 = spx.Rand__1(1.2)
@@ -378,8 +378,8 @@ func onMsg(msg string) {
 `, `package main
 
 import (
-	fmt "fmt"
-	spx2 "github.com/goplus/gop/cl/internal/spx2"
+	"fmt"
+	"github.com/goplus/gop/cl/internal/spx2"
 )
 
 type Game struct {
@@ -410,8 +410,8 @@ func onMsg(msg string) {
 `, `package main
 
 import (
-	fmt "fmt"
-	spx2 "github.com/goplus/gop/cl/internal/spx2"
+	"fmt"
+	"github.com/goplus/gop/cl/internal/spx2"
 )
 
 type Game struct {
@@ -442,8 +442,8 @@ func onMsg(msg string) {
 `, `package main
 
 import (
-	fmt "fmt"
-	spx2 "github.com/goplus/gop/cl/internal/spx2"
+	"fmt"
+	"github.com/goplus/gop/cl/internal/spx2"
 )
 
 type Dog struct {
@@ -472,7 +472,7 @@ func TestSpxMainEntry(t *testing.T) {
 `, `
 `, `package main
 
-import spx2 "github.com/goplus/gop/cl/internal/spx2"
+import "github.com/goplus/gop/cl/internal/spx2"
 
 type Game struct {
 	spx2.Game
@@ -491,7 +491,7 @@ var (
 `, `
 `, `package main
 
-import spx2 "github.com/goplus/gop/cl/internal/spx2"
+import "github.com/goplus/gop/cl/internal/spx2"
 
 type Game struct {
 	spx2.Game
@@ -525,8 +525,8 @@ func onMsg(msg string) {
 `, `package main
 
 import (
-	fmt "fmt"
-	spx2 "github.com/goplus/gop/cl/internal/spx2"
+	"fmt"
+	"github.com/goplus/gop/cl/internal/spx2"
 )
 
 type Game struct {
@@ -566,7 +566,7 @@ func onMsg(msg string) {
 }
 `, `package main
 
-import spx "github.com/goplus/gop/cl/internal/spx"
+import "github.com/goplus/gop/cl/internal/spx"
 
 type Game struct {
 	*spx.MyGame
@@ -624,7 +624,7 @@ func onCloned() {
 }
 `, `package main
 
-import spx "github.com/goplus/gop/cl/internal/spx"
+import "github.com/goplus/gop/cl/internal/spx"
 
 type info struct {
 	x int
@@ -672,7 +672,7 @@ func onMsg(msg string) {
 }
 `, `package main
 
-import spx "github.com/goplus/gop/cl/internal/spx"
+import "github.com/goplus/gop/cl/internal/spx"
 
 type Game struct {
 	*spx.MyGame
@@ -705,8 +705,8 @@ func onMsg(msg string) {
 `, `package main
 
 import (
-	fmt "fmt"
-	spx "github.com/goplus/gop/cl/internal/spx"
+	"fmt"
+	"github.com/goplus/gop/cl/internal/spx"
 )
 
 type Game struct {
diff --git a/cl/compile_test.go b/cl/compile_test.go
index eceb1c45..3a54eeb8 100644
--- a/cl/compile_test.go
+++ b/cl/compile_test.go
@@ -153,10 +153,10 @@ for line <- open("foo.txt")! {
 `, `package main
 
 import (
-	fmt "fmt"
-	os "os"
-	iox "github.com/goplus/gop/builtin/iox"
-	errors "github.com/qiniu/x/errors"
+	"fmt"
+	"os"
+	"github.com/goplus/gop/builtin/iox"
+	"github.com/qiniu/x/errors"
 )
 
 func main() {
@@ -190,9 +190,9 @@ for line <- os.Stdin {
 `, `package main
 
 import (
-	fmt "fmt"
-	os "os"
-	iox "github.com/goplus/gop/builtin/iox"
+	"fmt"
+	"os"
+	"github.com/goplus/gop/builtin/iox"
 )
 
 func main() {
@@ -220,9 +220,9 @@ for line <- lines(r) {
 `, `package main
 
 import (
-	fmt "fmt"
-	iox "github.com/goplus/gop/builtin/iox"
-	io "io"
+	"fmt"
+	"github.com/goplus/gop/builtin/iox"
+	"io"
 )
 
 var r io.Reader
@@ -294,7 +294,7 @@ type T struct{}
 println(&T{},&Point{10,20})
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type T struct {
 }
@@ -311,7 +311,7 @@ for i <- :10, i%3 == 0 {
 	println i
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	for i := 0; i < 10; i += 1 {
@@ -334,7 +334,7 @@ d := fvec([])
 println a, b, c, d
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type fvec []float64
 type foo float64
@@ -538,8 +538,8 @@ println "The Go+ Language for", fields.join(", ")
 `, `package main
 
 import (
-	fmt "fmt"
-	strings "strings"
+	"fmt"
+	"strings"
 )
 
 func main() {
@@ -555,7 +555,7 @@ p := println
 p "Hello world"
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	p := fmt.Println
@@ -921,8 +921,8 @@ func main() {
 }`, `package main
 
 import (
-	fmt "fmt"
-	errors "github.com/qiniu/x/errors"
+	"fmt"
+	"github.com/qiniu/x/errors"
 )
 
 func t() (int, int, error) {
@@ -955,7 +955,7 @@ func main() {
 	t()!
 }`, `package main
 
-import errors "github.com/qiniu/x/errors"
+import "github.com/qiniu/x/errors"
 
 func t() error {
 	return nil
@@ -998,7 +998,7 @@ func (a *A) String() string {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type AA interface {
 	String() string
@@ -1043,7 +1043,7 @@ func (a *A) String() string {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type AA interface {
 	String() string
@@ -1084,7 +1084,7 @@ func main() {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	{
@@ -1136,7 +1136,7 @@ func main() {
 var i int
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println(i)
@@ -1179,7 +1179,7 @@ func main() {
 var i = 100
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println(i)
@@ -1199,7 +1199,7 @@ func main() {
 	println(n)
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	v := []uint64{2, 3, 5}
@@ -1224,7 +1224,7 @@ func consume(xchg chan int) {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func consume(xchg chan int) {
 	select {
@@ -1397,7 +1397,7 @@ func main() {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type Shape interface {
 	Area() float64
@@ -1442,7 +1442,7 @@ type BigInt struct {
 	*big.Int
 }`, `package main
 
-import big "math/big"
+import "math/big"
 
 type BigInt struct {
 	*big.Int
@@ -1462,10 +1462,10 @@ func foo(script string) {
 `, `package main
 
 import (
-	fmt "fmt"
-	goptest "github.com/goplus/gop/ast/goptest"
-	errors "github.com/qiniu/x/errors"
-	gopq "github.com/goplus/gop/ast/gopq"
+	"fmt"
+	"github.com/goplus/gop/ast/goptest"
+	"github.com/qiniu/x/errors"
+	"github.com/goplus/gop/ast/gopq"
 )
 
 func foo(script string) {
@@ -1496,10 +1496,10 @@ func foo(script string) {
 `, `package main
 
 import (
-	fmt "fmt"
-	goptest "github.com/goplus/gop/ast/goptest"
-	errors "github.com/qiniu/x/errors"
-	gopq "github.com/goplus/gop/ast/gopq"
+	"fmt"
+	"github.com/goplus/gop/ast/goptest"
+	"github.com/qiniu/x/errors"
+	"github.com/goplus/gop/ast/gopq"
 )
 
 func foo(script string) {
@@ -1528,8 +1528,8 @@ func add(x, y string) (int, error) {
 `, `package main
 
 import (
-	strconv "strconv"
-	errors "github.com/qiniu/x/errors"
+	"strconv"
+	"github.com/qiniu/x/errors"
 )
 
 func add(x string, y string) (int, error) {
@@ -1569,7 +1569,7 @@ func addSafe(x, y string) int {
 }
 `, `package main
 
-import strconv "strconv"
+import "strconv"
 
 func addSafe(x string, y string) int {
 	return func() (_gop_ret int) {
@@ -1597,8 +1597,8 @@ var ret int = println("Hi")!
 `, `package main
 
 import (
-	fmt "fmt"
-	errors "github.com/qiniu/x/errors"
+	"fmt"
+	"github.com/qiniu/x/errors"
 )
 
 var ret int = func() (_gop_ret int) {
@@ -1622,7 +1622,7 @@ func mkdir(name string) error {
 mkdir! "foo"
 `, `package main
 
-import errors "github.com/qiniu/x/errors"
+import "github.com/qiniu/x/errors"
 
 func mkdir(name string) error {
 	return nil
@@ -1650,7 +1650,7 @@ func foo() (func(), error) {
 foo()!()
 `, `package main
 
-import errors "github.com/qiniu/x/errors"
+import "github.com/qiniu/x/errors"
 
 func foo() (func(), error) {
 	return nil, nil
@@ -1699,7 +1699,7 @@ var x, y uint128
 var z uint128 = x + y
 `, `package main
 
-import ng "github.com/goplus/gop/builtin/ng"
+import "github.com/goplus/gop/builtin/ng"
 
 var x, y ng.Uint128
 var z ng.Uint128 = x.Gop_Add__1(y)
@@ -1712,7 +1712,7 @@ var x, y int128
 var z int128 = x + y
 `, `package main
 
-import ng "github.com/goplus/gop/builtin/ng"
+import "github.com/goplus/gop/builtin/ng"
 
 var x, y ng.Int128
 var z ng.Int128 = x.Gop_Add__1(y)
@@ -1725,7 +1725,7 @@ var x, y bigint
 var z bigint = x + y
 `, `package main
 
-import ng "github.com/goplus/gop/builtin/ng"
+import "github.com/goplus/gop/builtin/ng"
 
 var x, y ng.Bigint
 var z ng.Bigint = x.Gop_Add(y)
@@ -1738,8 +1738,8 @@ var x = 1r
 `, `package main
 
 import (
-	ng "github.com/goplus/gop/builtin/ng"
-	big "math/big"
+	"github.com/goplus/gop/builtin/ng"
+	"math/big"
 )
 
 var x = ng.Bigint_Init__1(big.NewInt(1))
@@ -1751,7 +1751,7 @@ func TestUint128Lit(t *testing.T) {
 var x uint128 = 1
 `, `package main
 
-import ng "github.com/goplus/gop/builtin/ng"
+import "github.com/goplus/gop/builtin/ng"
 
 var x ng.Uint128 = ng.Uint128_Init__0(1)
 `)
@@ -1762,7 +1762,7 @@ func TestInt128Lit(t *testing.T) {
 var x int128 = 1
 `, `package main
 
-import ng "github.com/goplus/gop/builtin/ng"
+import "github.com/goplus/gop/builtin/ng"
 
 var x ng.Int128 = ng.Int128_Init__0(1)
 `)
@@ -1774,8 +1774,8 @@ var x = 1/2r
 `, `package main
 
 import (
-	ng "github.com/goplus/gop/builtin/ng"
-	big "math/big"
+	"github.com/goplus/gop/builtin/ng"
+	"math/big"
 )
 
 var x = ng.Bigrat_Init__2(big.NewRat(1, 2))
@@ -1788,8 +1788,8 @@ var x = 3 + 1/2r
 `, `package main
 
 import (
-	ng "github.com/goplus/gop/builtin/ng"
-	big "math/big"
+	"github.com/goplus/gop/builtin/ng"
+	"math/big"
 )
 
 var x = ng.Bigrat_Init__2(big.NewRat(7, 2))
@@ -1805,8 +1805,8 @@ var z = 100 + y
 `, `package main
 
 import (
-	ng "github.com/goplus/gop/builtin/ng"
-	big "math/big"
+	"github.com/goplus/gop/builtin/ng"
+	"math/big"
 )
 
 var x = ng.Bigrat_Init__2(big.NewRat(7, 2))
@@ -1919,7 +1919,7 @@ var x bigint
 x += 3
 `, `package main
 
-import ng "github.com/goplus/gop/builtin/ng"
+import "github.com/goplus/gop/builtin/ng"
 
 var x ng.Bigint
 
@@ -1936,8 +1936,8 @@ x *= 2
 `, `package main
 
 import (
-	ng "github.com/goplus/gop/builtin/ng"
-	big "math/big"
+	"github.com/goplus/gop/builtin/ng"
+	"math/big"
 )
 
 func main() {
@@ -1954,8 +1954,8 @@ x *= 2r
 `, `package main
 
 import (
-	ng "github.com/goplus/gop/builtin/ng"
-	big "math/big"
+	"github.com/goplus/gop/builtin/ng"
+	"math/big"
 )
 
 func main() {
@@ -2228,7 +2228,7 @@ go println("Hi")
 defer println("Go+")
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	go fmt.Println("Hi")
@@ -2248,7 +2248,7 @@ for {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	a := []float64{1, 3.4, 5}
@@ -2285,7 +2285,7 @@ for range a {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	a := []float64{1, 3.4, 5}
@@ -2323,7 +2323,7 @@ for k, v := range new(foo) {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type foo struct {
 }
@@ -2351,7 +2351,7 @@ for v <- new(foo) {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type foo struct {
 }
@@ -2386,7 +2386,7 @@ for k, v <- new(foo) {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type fooIter struct {
 }
@@ -2422,7 +2422,7 @@ func (p *foo) Gop_Enum(c func(val string)) {
 println([v for v <- new(foo)])
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type foo struct {
 }
@@ -2473,7 +2473,7 @@ for k, v <- newFoo() {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type fooIter struct {
 	data *foo
@@ -2522,7 +2522,7 @@ for i, x <- [1, 3, 5, 7, 11, 13, 17] {
 println("sum(5,7,11,13,17):", sum)
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	sum := 0
@@ -2693,7 +2693,7 @@ x := [[a, b] for a <- arr, a < b for b <- arr, b > 2]
 println("x:", x)
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	arr := []float64{1, 2, 3, 4.1, 5, 6}
@@ -2799,8 +2799,8 @@ println("x:", x)
 `, `package main
 
 import (
-	fmt "fmt"
-	strings "strings"
+	"fmt"
+	"strings"
 )
 
 func main() {
@@ -2823,7 +2823,7 @@ func bar(p pfoo) {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type foo struct {
 	req int
@@ -2852,7 +2852,7 @@ a.B = "Hi"
 flag.Usage = nil
 `, `package main
 
-import flag "flag"
+import "flag"
 
 func main() {
 	a := &struct {
@@ -2912,7 +2912,7 @@ func (M) Bar() {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type M int
 
@@ -2959,7 +2959,7 @@ var d = -a       // TODO: -a have no return value!
 var e = a!=b
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type foo struct {
 }
@@ -2993,7 +2993,7 @@ var e = a.Gop_NE(b)
 func TestCmdlineNoEOL(t *testing.T) {
 	gopClTest(t, `println "Hi"`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println("Hi")
@@ -3008,7 +3008,7 @@ func main() {
 	fmt.println "Hi"
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println("Hi")
@@ -3022,7 +3022,7 @@ func TestDotImport(t *testing.T) {
 var a = round(1.2)
 `, `package main
 
-import math "math"
+import "math"
 
 var a = math.Round(1.2)
 `)
@@ -3034,7 +3034,7 @@ func TestLocalImport(t *testing.T) {
 var a = spx.TestIntValue
 `, `package main
 
-import spx "github.com/goplus/gop/cl/internal/spx"
+import "github.com/goplus/gop/cl/internal/spx"
 
 var a = spx.TestIntValue
 `)
@@ -3069,7 +3069,7 @@ func TestAnonymousImport(t *testing.T) {
 printf("Hello Go+\n")
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println("Hello")
@@ -3108,7 +3108,7 @@ func main() {
 	fmt.Println("Hi")
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	const (
@@ -3133,7 +3133,7 @@ if t := false; t {
 println("x:", x)
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	x := 0
@@ -3173,7 +3173,7 @@ default:
 println("x:", x)
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	x := 0
@@ -3214,7 +3214,7 @@ default:
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	v := "Hello"
@@ -3246,7 +3246,7 @@ label:
 	}
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	a := []float64{1, 3.4, 5}
@@ -3273,7 +3273,7 @@ func main() {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func foo(format string, args ...interface {
 }) (int, error) {
@@ -3311,7 +3311,7 @@ func(v string) {
 }("Hello")
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	func(v string) {
@@ -3452,7 +3452,7 @@ Do => {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func Do(func()) {
 }
@@ -3621,7 +3621,7 @@ func bar(foo func(string, ...interface{}) (int, error)) {
 bar(fmt.Printf)
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func bar(foo func(string, ...interface {
 }) (int, error)) {
@@ -3658,8 +3658,8 @@ fmt.Println(printf("Hello, %v\n", "Go+"))
 `, `package main
 
 import (
-	fmt "fmt"
-	strings "strings"
+	"fmt"
+	"strings"
 )
 
 func foo(x string) string {
@@ -3687,7 +3687,7 @@ func TestFuncCall(t *testing.T) {
 
 fmt.Println("Hello")`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println("Hello")
@@ -3705,7 +3705,7 @@ func foo(args ...interface{}) {
 func main() {
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func foo(args ...interface {
 }) {
@@ -3728,7 +3728,7 @@ func foo(args ...interface{}) {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	foo("Hello", 123)
@@ -3764,7 +3764,7 @@ func TestAssignUnderscore(t *testing.T) {
 _, err := log.Println("Hello")
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	_, err := fmt.Println("Hello")
@@ -3811,8 +3811,8 @@ println(rmap)
 `, `package main
 
 import (
-	fmt "fmt"
-	foo "github.com/goplus/gop/cl/internal/gop-in-go/foo"
+	"fmt"
+	"github.com/goplus/gop/cl/internal/gop-in-go/foo"
 )
 
 func main() {
@@ -3857,8 +3857,8 @@ func New() Result {
 `, `package main
 
 import (
-	reflect "reflect"
-	testing "testing"
+	"reflect"
+	"testing"
 )
 
 type Repo struct {
@@ -3902,7 +3902,7 @@ for i $ :10 {
 	println(i)
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	for i := 0; i < 10; i += 1 {
@@ -3915,7 +3915,7 @@ for i $ 1:10:3 {
 	println(i)
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	for i := 1; i < 10; i += 3 {
@@ -3931,7 +3931,7 @@ for i $ 1:10:2 {
 	println(i)
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	for i := 1; i < 10; i += 2 {
@@ -3947,7 +3947,7 @@ for i $ 1:10 {
 	println(i)
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	for i := 1; i < 10; i += 1 {
@@ -3963,7 +3963,7 @@ for i $ :10:2 {
 	println(i)
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	for i := 0; i < 10; i += 2 {
@@ -3979,7 +3979,7 @@ for range :10 {
 	println("Hi")
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	for _gop_k := 0; _gop_k < 10; _gop_k += 1 {
@@ -3995,7 +3995,7 @@ for _ <- :10 {
 	println("Hi")
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	for _gop_k := 0; _gop_k < 10; _gop_k += 1 {
@@ -4011,8 +4011,8 @@ println [x for x <- 0:3:1]
 `, `package main
 
 import (
-	fmt "fmt"
-	builtin "github.com/goplus/gop/builtin"
+	"fmt"
+	"github.com/goplus/gop/builtin"
 )
 
 func main() {
@@ -4058,7 +4058,7 @@ func TestRangeExpr8(t *testing.T) {
 	}
 	`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type T struct {
 }
@@ -4102,7 +4102,7 @@ func TestRangeExpr9(t *testing.T) {
 	}
 	`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type T struct {
 }
@@ -4158,7 +4158,7 @@ func TestNoEntrypoint(t *testing.T) {
 	gopClTest(t, `println("init")
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println("init")
@@ -4168,7 +4168,7 @@ func main() {
 println("init")
 `, `package bar
 
-import fmt "fmt"
+import "fmt"
 
 func init() {
 	fmt.Println("init")
@@ -4192,7 +4192,7 @@ println []
 println {}
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println([]interface {
@@ -4216,7 +4216,7 @@ type Point struct {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type Point struct {
 	X int
@@ -4239,7 +4239,7 @@ println "hello"
 println("hello")
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Print()
@@ -4258,7 +4258,7 @@ var a any = 100
 println(a)
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 var a interface {
 } = 100
@@ -4285,7 +4285,7 @@ func test() {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func test() {
 	fmt.Println("hello")
@@ -4300,7 +4300,7 @@ func main() {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println("hello")
@@ -4313,7 +4313,7 @@ func TestCommandNotExpr(t *testing.T) {
 println !true
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println(false)
@@ -4324,7 +4324,7 @@ a := true
 println !a
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	a := true
@@ -4335,7 +4335,7 @@ func main() {
 println !func() bool { return true }()
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println(!func() bool {
@@ -4389,7 +4389,7 @@ var (
 func test(){}
 `, `package main
 
-import bytes "bytes"
+import "bytes"
 
 type Rect struct {
 	bytes.Buffer
@@ -4406,7 +4406,7 @@ var (
 func test(){}
 `, `package main
 
-import bytes "bytes"
+import "bytes"
 
 type Rect struct {
 	*bytes.Buffer
@@ -4425,7 +4425,7 @@ var (
 func test(){}
 `, `package main
 
-import bytes "bytes"
+import "bytes"
 
 type Rect struct {
 	*bytes.Buffer `+"`spec:\"buffer\"`"+`
@@ -4493,7 +4493,7 @@ n.onKey ["a"],nil,key => {
 }
 `, `package main
 
-import foo "github.com/goplus/gop/cl/internal/overload/foo"
+import "github.com/goplus/gop/cl/internal/overload/foo"
 
 type Mesh struct {
 }
diff --git a/cl/outline/cl/compile_spx_test.go b/cl/outline/cl/compile_spx_test.go
index 583afaf9..a4d381b1 100644
--- a/cl/outline/cl/compile_spx_test.go
+++ b/cl/outline/cl/compile_spx_test.go
@@ -163,7 +163,7 @@ func onMsg(msg string) {
 }
 `, `package main
 
-import spx "github.com/goplus/gop/cl/internal/spx"
+import "github.com/goplus/gop/cl/internal/spx"
 
 type Game struct {
 	*spx.MyGame
@@ -208,8 +208,8 @@ func onInit() {
 `, ``, `package main
 
 import (
-	fmt "fmt"
-	spx "github.com/goplus/gop/cl/internal/spx"
+	"fmt"
+	"github.com/goplus/gop/cl/internal/spx"
 )
 
 type bar struct {
@@ -249,8 +249,8 @@ func onInit() {
 `, `package main
 
 import (
-	spx "github.com/goplus/gop/cl/internal/spx"
-	math "math"
+	"github.com/goplus/gop/cl/internal/spx"
+	"math"
 )
 
 type Game struct {
@@ -300,7 +300,7 @@ func onCloned() {
 }
 `, `package main
 
-import spx "github.com/goplus/gop/cl/internal/spx"
+import "github.com/goplus/gop/cl/internal/spx"
 
 type Game struct {
 	*spx.MyGame
@@ -340,8 +340,8 @@ println "Hi"
 `, `package main
 
 import (
-	fmt "fmt"
-	spx "github.com/goplus/gop/cl/internal/spx"
+	"fmt"
+	"github.com/goplus/gop/cl/internal/spx"
 )
 
 type Kai struct {
@@ -377,8 +377,8 @@ func onMsg(msg string) {
 `, `package main
 
 import (
-	fmt "fmt"
-	spx2 "github.com/goplus/gop/cl/internal/spx2"
+	"fmt"
+	"github.com/goplus/gop/cl/internal/spx2"
 )
 
 type Game struct {
@@ -407,8 +407,8 @@ func onMsg(msg string) {
 `, `package main
 
 import (
-	fmt "fmt"
-	spx2 "github.com/goplus/gop/cl/internal/spx2"
+	"fmt"
+	"github.com/goplus/gop/cl/internal/spx2"
 )
 
 type Game struct {
@@ -437,8 +437,8 @@ func onMsg(msg string) {
 `, `package main
 
 import (
-	fmt "fmt"
-	spx2 "github.com/goplus/gop/cl/internal/spx2"
+	"fmt"
+	"github.com/goplus/gop/cl/internal/spx2"
 )
 
 type Dog struct {
@@ -465,7 +465,7 @@ func TestSpxMainEntry(t *testing.T) {
 `, `
 `, `package main
 
-import spx2 "github.com/goplus/gop/cl/internal/spx2"
+import "github.com/goplus/gop/cl/internal/spx2"
 
 type Game struct {
 	spx2.Game
@@ -488,7 +488,7 @@ var (
 `, `
 `, `package main
 
-import spx2 "github.com/goplus/gop/cl/internal/spx2"
+import "github.com/goplus/gop/cl/internal/spx2"
 
 type Game struct {
 	spx2.Game
@@ -522,8 +522,8 @@ func onMsg(msg string) {
 `, `package main
 
 import (
-	fmt "fmt"
-	spx2 "github.com/goplus/gop/cl/internal/spx2"
+	"fmt"
+	"github.com/goplus/gop/cl/internal/spx2"
 )
 
 type Game struct {
@@ -563,7 +563,7 @@ func onMsg(msg string) {
 }
 `, `package main
 
-import spx "github.com/goplus/gop/cl/internal/spx"
+import "github.com/goplus/gop/cl/internal/spx"
 
 type Game struct {
 	*spx.MyGame
@@ -619,7 +619,7 @@ func onCloned() {
 }
 `, `package main
 
-import spx "github.com/goplus/gop/cl/internal/spx"
+import "github.com/goplus/gop/cl/internal/spx"
 
 type Game struct {
 	*spx.MyGame
@@ -667,7 +667,7 @@ func onMsg(msg string) {
 }
 `, `package main
 
-import spx "github.com/goplus/gop/cl/internal/spx"
+import "github.com/goplus/gop/cl/internal/spx"
 
 type Game struct {
 	*spx.MyGame
@@ -698,8 +698,8 @@ func onMsg(msg string) {
 `, `package main
 
 import (
-	fmt "fmt"
-	spx "github.com/goplus/gop/cl/internal/spx"
+	"fmt"
+	"github.com/goplus/gop/cl/internal/spx"
 )
 
 type Game struct {
diff --git a/cl/outline/cl/compile_test.go b/cl/outline/cl/compile_test.go
index 87dd7447..52fd5dc4 100644
--- a/cl/outline/cl/compile_test.go
+++ b/cl/outline/cl/compile_test.go
@@ -157,10 +157,10 @@ for line <- open("foo.txt")! {
 `, `package main
 
 import (
-	fmt "fmt"
-	os "os"
-	iox "github.com/goplus/gop/builtin/iox"
-	errors "github.com/qiniu/x/errors"
+	"fmt"
+	"os"
+	"github.com/goplus/gop/builtin/iox"
+	"github.com/qiniu/x/errors"
 )
 
 func main() {
@@ -194,9 +194,9 @@ for line <- os.Stdin {
 `, `package main
 
 import (
-	fmt "fmt"
-	os "os"
-	iox "github.com/goplus/gop/builtin/iox"
+	"fmt"
+	"os"
+	"github.com/goplus/gop/builtin/iox"
 )
 
 func main() {
@@ -224,9 +224,9 @@ for line <- lines(r) {
 `, `package main
 
 import (
-	fmt "fmt"
-	iox "github.com/goplus/gop/builtin/iox"
-	io "io"
+	"fmt"
+	"github.com/goplus/gop/builtin/iox"
+	"io"
 )
 
 var r io.Reader
@@ -298,7 +298,7 @@ type T struct{}
 println(&T{},&Point{10,20})
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type T struct {
 }
@@ -315,7 +315,7 @@ for i <- :10, i%3 == 0 {
 	println i
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	for i := 0; i < 10; i += 1 {
@@ -338,7 +338,7 @@ d := fvec([])
 println a, b, c, d
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type fvec []float64
 type foo float64
@@ -542,8 +542,8 @@ println "The Go+ Language for", fields.join(", ")
 `, `package main
 
 import (
-	fmt "fmt"
-	strings "strings"
+	"fmt"
+	"strings"
 )
 
 func main() {
@@ -559,7 +559,7 @@ p := println
 p "Hello world"
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	p := fmt.Println
@@ -927,8 +927,8 @@ func main() {
 }`, `package main
 
 import (
-	fmt "fmt"
-	errors "github.com/qiniu/x/errors"
+	"fmt"
+	"github.com/qiniu/x/errors"
 )
 
 func t() (int, int, error) {
@@ -961,7 +961,7 @@ func main() {
 	t()!
 }`, `package main
 
-import errors "github.com/qiniu/x/errors"
+import "github.com/qiniu/x/errors"
 
 func t() error {
 	return nil
@@ -1004,7 +1004,7 @@ func (a *A) String() string {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type AA interface {
 	String() string
@@ -1049,7 +1049,7 @@ func (a *A) String() string {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type AA interface {
 	String() string
@@ -1090,7 +1090,7 @@ func main() {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	{
@@ -1159,7 +1159,7 @@ func main() {
 var i int
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 var i int
 
@@ -1202,7 +1202,7 @@ func main() {
 var i = 100
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 var i = 100
 
@@ -1222,7 +1222,7 @@ func main() {
 	println(n)
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	v := []uint64{2, 3, 5}
@@ -1247,7 +1247,7 @@ func consume(xchg chan int) {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func consume(xchg chan int) {
 	select {
@@ -1420,7 +1420,7 @@ func main() {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type Shape interface {
 	Area() float64
@@ -1465,7 +1465,7 @@ type BigInt struct {
 	*big.Int
 }`, `package main
 
-import big "math/big"
+import "math/big"
 
 type BigInt struct {
 	*big.Int
@@ -1485,10 +1485,10 @@ func foo(script string) {
 `, `package main
 
 import (
-	fmt "fmt"
-	goptest "github.com/goplus/gop/ast/goptest"
-	errors "github.com/qiniu/x/errors"
-	gopq "github.com/goplus/gop/ast/gopq"
+	"fmt"
+	"github.com/goplus/gop/ast/goptest"
+	"github.com/qiniu/x/errors"
+	"github.com/goplus/gop/ast/gopq"
 )
 
 func foo(script string) {
@@ -1519,10 +1519,10 @@ func foo(script string) {
 `, `package main
 
 import (
-	fmt "fmt"
-	goptest "github.com/goplus/gop/ast/goptest"
-	errors "github.com/qiniu/x/errors"
-	gopq "github.com/goplus/gop/ast/gopq"
+	"fmt"
+	"github.com/goplus/gop/ast/goptest"
+	"github.com/qiniu/x/errors"
+	"github.com/goplus/gop/ast/gopq"
 )
 
 func foo(script string) {
@@ -1551,8 +1551,8 @@ func add(x, y string) (int, error) {
 `, `package main
 
 import (
-	strconv "strconv"
-	errors "github.com/qiniu/x/errors"
+	"strconv"
+	"github.com/qiniu/x/errors"
 )
 
 func add(x string, y string) (int, error) {
@@ -1592,7 +1592,7 @@ func addSafe(x, y string) int {
 }
 `, `package main
 
-import strconv "strconv"
+import "strconv"
 
 func addSafe(x string, y string) int {
 	return func() (_gop_ret int) {
@@ -1620,8 +1620,8 @@ var ret int = println("Hi")!
 `, `package main
 
 import (
-	fmt "fmt"
-	errors "github.com/qiniu/x/errors"
+	"fmt"
+	"github.com/qiniu/x/errors"
 )
 
 var ret int = func() (_gop_ret int) {
@@ -1645,7 +1645,7 @@ func mkdir(name string) error {
 mkdir! "foo"
 `, `package main
 
-import errors "github.com/qiniu/x/errors"
+import "github.com/qiniu/x/errors"
 
 func mkdir(name string) error {
 	return nil
@@ -1673,7 +1673,7 @@ func foo() (func(), error) {
 foo()!()
 `, `package main
 
-import errors "github.com/qiniu/x/errors"
+import "github.com/qiniu/x/errors"
 
 func foo() (func(), error) {
 	return nil, nil
@@ -1722,7 +1722,7 @@ var x, y uint128
 var z uint128 = x + y
 `, `package main
 
-import ng "github.com/goplus/gop/builtin/ng"
+import "github.com/goplus/gop/builtin/ng"
 
 var x, y ng.Uint128
 var z ng.Uint128 = x.Gop_Add__1(y)
@@ -1735,7 +1735,7 @@ var x, y int128
 var z int128 = x + y
 `, `package main
 
-import ng "github.com/goplus/gop/builtin/ng"
+import "github.com/goplus/gop/builtin/ng"
 
 var x, y ng.Int128
 var z ng.Int128 = x.Gop_Add__1(y)
@@ -1748,7 +1748,7 @@ var x, y bigint
 var z bigint = x + y
 `, `package main
 
-import ng "github.com/goplus/gop/builtin/ng"
+import "github.com/goplus/gop/builtin/ng"
 
 var x, y ng.Bigint
 var z ng.Bigint = x.Gop_Add(y)
@@ -1761,8 +1761,8 @@ var x = 1r
 `, `package main
 
 import (
-	ng "github.com/goplus/gop/builtin/ng"
-	big "math/big"
+	"github.com/goplus/gop/builtin/ng"
+	"math/big"
 )
 
 var x = ng.Bigint_Init__1(big.NewInt(1))
@@ -1774,7 +1774,7 @@ func TestUint128Lit(t *testing.T) {
 var x uint128 = 1
 `, `package main
 
-import ng "github.com/goplus/gop/builtin/ng"
+import "github.com/goplus/gop/builtin/ng"
 
 var x ng.Uint128 = ng.Uint128_Init__0(1)
 `)
@@ -1785,7 +1785,7 @@ func TestInt128Lit(t *testing.T) {
 var x int128 = 1
 `, `package main
 
-import ng "github.com/goplus/gop/builtin/ng"
+import "github.com/goplus/gop/builtin/ng"
 
 var x ng.Int128 = ng.Int128_Init__0(1)
 `)
@@ -1797,8 +1797,8 @@ var x = 1/2r
 `, `package main
 
 import (
-	ng "github.com/goplus/gop/builtin/ng"
-	big "math/big"
+	"github.com/goplus/gop/builtin/ng"
+	"math/big"
 )
 
 var x = ng.Bigrat_Init__2(big.NewRat(1, 2))
@@ -1811,8 +1811,8 @@ var x = 3 + 1/2r
 `, `package main
 
 import (
-	ng "github.com/goplus/gop/builtin/ng"
-	big "math/big"
+	"github.com/goplus/gop/builtin/ng"
+	"math/big"
 )
 
 var x = ng.Bigrat_Init__2(big.NewRat(7, 2))
@@ -1828,8 +1828,8 @@ var z = 100 + y
 `, `package main
 
 import (
-	ng "github.com/goplus/gop/builtin/ng"
-	big "math/big"
+	"github.com/goplus/gop/builtin/ng"
+	"math/big"
 )
 
 var x = ng.Bigrat_Init__2(big.NewRat(7, 2))
@@ -1942,7 +1942,7 @@ var x bigint
 x += 3
 `, `package main
 
-import ng "github.com/goplus/gop/builtin/ng"
+import "github.com/goplus/gop/builtin/ng"
 
 var x ng.Bigint
 
@@ -1959,8 +1959,8 @@ x *= 2
 `, `package main
 
 import (
-	ng "github.com/goplus/gop/builtin/ng"
-	big "math/big"
+	"github.com/goplus/gop/builtin/ng"
+	"math/big"
 )
 
 func main() {
@@ -1977,8 +1977,8 @@ x *= 2r
 `, `package main
 
 import (
-	ng "github.com/goplus/gop/builtin/ng"
-	big "math/big"
+	"github.com/goplus/gop/builtin/ng"
+	"math/big"
 )
 
 func main() {
@@ -2251,7 +2251,7 @@ go println("Hi")
 defer println("Go+")
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	go fmt.Println("Hi")
@@ -2271,7 +2271,7 @@ for {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	a := []float64{1, 3.4, 5}
@@ -2308,7 +2308,7 @@ for range a {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	a := []float64{1, 3.4, 5}
@@ -2346,7 +2346,7 @@ for k, v := range new(foo) {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type foo struct {
 }
@@ -2374,7 +2374,7 @@ for v <- new(foo) {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type foo struct {
 }
@@ -2409,7 +2409,7 @@ for k, v <- new(foo) {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type fooIter struct {
 }
@@ -2445,7 +2445,7 @@ func (p *foo) Gop_Enum(c func(val string)) {
 println([v for v <- new(foo)])
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type foo struct {
 }
@@ -2496,7 +2496,7 @@ for k, v <- newFoo() {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type fooIter struct {
 	data *foo
@@ -2545,7 +2545,7 @@ for i, x <- [1, 3, 5, 7, 11, 13, 17] {
 println("sum(5,7,11,13,17):", sum)
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	sum := 0
@@ -2716,7 +2716,7 @@ x := [[a, b] for a <- arr, a < b for b <- arr, b > 2]
 println("x:", x)
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	arr := []float64{1, 2, 3, 4.1, 5, 6}
@@ -2822,8 +2822,8 @@ println("x:", x)
 `, `package main
 
 import (
-	fmt "fmt"
-	strings "strings"
+	"fmt"
+	"strings"
 )
 
 func main() {
@@ -2846,7 +2846,7 @@ func bar(p pfoo) {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type foo struct {
 	req int
@@ -2875,7 +2875,7 @@ a.B = "Hi"
 flag.Usage = nil
 `, `package main
 
-import flag "flag"
+import "flag"
 
 func main() {
 	a := &struct {
@@ -2935,7 +2935,7 @@ func (M) Bar() {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type M int
 
@@ -2982,7 +2982,7 @@ var d = -a       // TODO: -a have no return value!
 var e = a!=b
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type foo struct {
 }
@@ -3016,7 +3016,7 @@ func (a foo) Gop_NE(b foo) bool {
 func TestCmdlineNoEOL(t *testing.T) {
 	gopClTest(t, `println "Hi"`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println("Hi")
@@ -3031,7 +3031,7 @@ func main() {
 	fmt.println "Hi"
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println("Hi")
@@ -3045,7 +3045,7 @@ func TestDotImport(t *testing.T) {
 var a = round(1.2)
 `, `package main
 
-import math "math"
+import "math"
 
 var a = math.Round(1.2)
 `)
@@ -3057,7 +3057,7 @@ func TestLocalImport(t *testing.T) {
 var a = spx.TestIntValue
 `, `package main
 
-import spx "github.com/goplus/gop/cl/internal/spx"
+import "github.com/goplus/gop/cl/internal/spx"
 
 var a = spx.TestIntValue
 `)
@@ -3092,7 +3092,7 @@ func TestAnonymousImport(t *testing.T) {
 printf("Hello Go+\n")
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println("Hello")
@@ -3131,7 +3131,7 @@ func main() {
 	fmt.Println("Hi")
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	const (
@@ -3156,7 +3156,7 @@ if t := false; t {
 println("x:", x)
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	x := 0
@@ -3196,7 +3196,7 @@ default:
 println("x:", x)
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	x := 0
@@ -3237,7 +3237,7 @@ default:
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	v := "Hello"
@@ -3269,7 +3269,7 @@ label:
 	}
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	a := []float64{1, 3.4, 5}
@@ -3296,7 +3296,7 @@ func main() {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func foo(format string, args ...interface {
 }) (int, error) {
@@ -3334,7 +3334,7 @@ func(v string) {
 }("Hello")
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	func(v string) {
@@ -3475,7 +3475,7 @@ Do => {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func Do(func()) {
 }
@@ -3644,7 +3644,7 @@ func bar(foo func(string, ...interface{}) (int, error)) {
 bar(fmt.Printf)
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func bar(foo func(string, ...interface {
 }) (int, error)) {
@@ -3681,8 +3681,8 @@ fmt.Println(printf("Hello, %v\n", "Go+"))
 `, `package main
 
 import (
-	fmt "fmt"
-	strings "strings"
+	"fmt"
+	"strings"
 )
 
 func foo(x string) string {
@@ -3710,7 +3710,7 @@ func TestFuncCall(t *testing.T) {
 
 fmt.Println("Hello")`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println("Hello")
@@ -3728,7 +3728,7 @@ func foo(args ...interface{}) {
 func main() {
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func foo(args ...interface {
 }) {
@@ -3751,7 +3751,7 @@ func foo(args ...interface{}) {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	foo("Hello", 123)
@@ -3787,7 +3787,7 @@ func TestAssignUnderscore(t *testing.T) {
 _, err := log.Println("Hello")
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	_, err := fmt.Println("Hello")
@@ -3838,8 +3838,8 @@ println(rmap)
 `, `package main
 
 import (
-	fmt "fmt"
-	foo "github.com/goplus/gop/cl/internal/gop-in-go/foo"
+	"fmt"
+	"github.com/goplus/gop/cl/internal/gop-in-go/foo"
 )
 
 func main() {
@@ -3884,8 +3884,8 @@ func New() Result {
 `, `package main
 
 import (
-	reflect "reflect"
-	testing "testing"
+	"reflect"
+	"testing"
 )
 
 type Repo struct {
@@ -3929,7 +3929,7 @@ for i $ :10 {
 	println(i)
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	for i := 0; i < 10; i += 1 {
@@ -3942,7 +3942,7 @@ for i $ 1:10:3 {
 	println(i)
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	for i := 1; i < 10; i += 3 {
@@ -3958,7 +3958,7 @@ for i $ 1:10:2 {
 	println(i)
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	for i := 1; i < 10; i += 2 {
@@ -3974,7 +3974,7 @@ for i $ 1:10 {
 	println(i)
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	for i := 1; i < 10; i += 1 {
@@ -3990,7 +3990,7 @@ for i $ :10:2 {
 	println(i)
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	for i := 0; i < 10; i += 2 {
@@ -4006,7 +4006,7 @@ for range :10 {
 	println("Hi")
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	for _gop_k := 0; _gop_k < 10; _gop_k += 1 {
@@ -4022,7 +4022,7 @@ for _ <- :10 {
 	println("Hi")
 }`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	for _gop_k := 0; _gop_k < 10; _gop_k += 1 {
@@ -4038,8 +4038,8 @@ println [x for x <- 0:3:1]
 `, `package main
 
 import (
-	fmt "fmt"
-	builtin "github.com/goplus/gop/builtin"
+	"fmt"
+	"github.com/goplus/gop/builtin"
 )
 
 func main() {
@@ -4085,7 +4085,7 @@ func TestRangeExpr8(t *testing.T) {
 	}
 	`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type T struct {
 }
@@ -4129,7 +4129,7 @@ func TestRangeExpr9(t *testing.T) {
 	}
 	`, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type T struct {
 }
@@ -4185,7 +4185,7 @@ func TestNoEntrypoint(t *testing.T) {
 	gopClTest(t, `println("init")
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println("init")
@@ -4195,7 +4195,7 @@ func main() {
 println("init")
 `, `package bar
 
-import fmt "fmt"
+import "fmt"
 
 func init() {
 	fmt.Println("init")
@@ -4219,7 +4219,7 @@ println []
 println {}
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println([]interface {
@@ -4243,7 +4243,7 @@ type Point struct {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type Point struct {
 	X int
@@ -4266,7 +4266,7 @@ println "hello"
 println("hello")
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Print()
@@ -4285,7 +4285,7 @@ var a any = 100
 println(a)
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 var a interface {
 } = 100
@@ -4312,7 +4312,7 @@ func test() {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func test() {
 	fmt.Println("hello")
@@ -4327,7 +4327,7 @@ func main() {
 }
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println("hello")
@@ -4340,7 +4340,7 @@ func TestCommandNotExpr(t *testing.T) {
 println !true
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println(false)
@@ -4351,7 +4351,7 @@ a := true
 println !a
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	a := true
@@ -4362,7 +4362,7 @@ func main() {
 println !func() bool { return true }()
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println(!func() bool {
@@ -4416,7 +4416,7 @@ var (
 func test(){}
 `, `package main
 
-import bytes "bytes"
+import "bytes"
 
 type Rect struct {
 	bytes.Buffer
@@ -4433,7 +4433,7 @@ var (
 func test(){}
 `, `package main
 
-import bytes "bytes"
+import "bytes"
 
 type Rect struct {
 	*bytes.Buffer
@@ -4452,7 +4452,7 @@ var (
 func test(){}
 `, `package main
 
-import bytes "bytes"
+import "bytes"
 
 type Rect struct {
 	*bytes.Buffer `+"`spec:\"buffer\"`"+`
@@ -4520,7 +4520,7 @@ n.onKey ["a"],nil,key => {
 }
 `, `package main
 
-import foo "github.com/goplus/gop/cl/internal/overload/foo"
+import "github.com/goplus/gop/cl/internal/overload/foo"
 
 type Mesh struct {
 }
diff --git a/cl/outline/cl/typeparams_test.go b/cl/outline/cl/typeparams_test.go
index bb0a47f0..644e084f 100644
--- a/cl/outline/cl/typeparams_test.go
+++ b/cl/outline/cl/typeparams_test.go
@@ -161,7 +161,7 @@ v3.Append([1,2,3,4]...)
 v3.Append2([1,2,3,4]...)
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type DataString = Data[string]
 type SliceString = Slice[[]string, string]
diff --git a/cl/typeparams_test.go b/cl/typeparams_test.go
index a35f9369..c700ce1d 100644
--- a/cl/typeparams_test.go
+++ b/cl/typeparams_test.go
@@ -166,7 +166,7 @@ v3.Append([1,2,3,4]...)
 v3.Append2([1,2,3,4]...)
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type DataString = Data[string]
 type SliceString = Slice[[]string, string]
diff --git a/x/build/_testdata/hello/hello.expect b/x/build/_testdata/hello/hello.expect
index e62ecea4..13b98bf6 100644
--- a/x/build/_testdata/hello/hello.expect
+++ b/x/build/_testdata/hello/hello.expect
@@ -1,6 +1,6 @@
 package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println("Go+")
diff --git a/x/build/_testdata/multi/multi.expect b/x/build/_testdata/multi/multi.expect
index 9eb31ec2..e2243eb6 100644
--- a/x/build/_testdata/multi/multi.expect
+++ b/x/build/_testdata/multi/multi.expect
@@ -1,6 +1,6 @@
 package main
 
-import fmt "fmt"
+import "fmt"
 
 type BaseClass struct {
 	x int
diff --git a/x/build/_testdata/pkg/pkg.expect b/x/build/_testdata/pkg/pkg.expect
index e71e8cb8..54ec8242 100644
--- a/x/build/_testdata/pkg/pkg.expect
+++ b/x/build/_testdata/pkg/pkg.expect
@@ -1,6 +1,6 @@
 package pkg
 
-import fmt "fmt"
+import "fmt"
 
 func Hello() {
 	fmt.Println("Go+")
diff --git a/x/build/build_test.go b/x/build/build_test.go
index a677214e..cb867bd2 100644
--- a/x/build/build_test.go
+++ b/x/build/build_test.go
@@ -84,7 +84,7 @@ println "Go+"
 `
 	var expect = `package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println("Go+")
@@ -108,7 +108,7 @@ func TestGox(t *testing.T) {
 println "Go+"
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type Rect struct {
 }
@@ -130,7 +130,7 @@ type Buffer struct {
 println "Go+"
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type Buffer struct {
 	buf []byte
@@ -157,7 +157,7 @@ type Buffer struct {
 println "Go+"
 `, `package main
 
-import fmt "fmt"
+import "fmt"
 
 type Buffer struct {
 	buf []byte
@@ -183,8 +183,8 @@ println "Go+"
 `, `package main
 
 import (
-	fmt "fmt"
-	bytes "bytes"
+	"fmt"
+	"bytes"
 )
 
 type Rect struct {
@@ -208,8 +208,8 @@ println "Go+"
 `, `package main
 
 import (
-	fmt "fmt"
-	bytes "bytes"
+	"fmt"
+	"bytes"
 )
 
 type Rect struct {
@@ -232,9 +232,9 @@ println a+1/2r
 `, `package main
 
 import (
-	fmt "fmt"
-	ng "github.com/goplus/gop/builtin/ng"
-	big "math/big"
+	"fmt"
+	"github.com/goplus/gop/builtin/ng"
+	"math/big"
 )
 
 func main() {
@@ -256,9 +256,9 @@ for line <- lines(r) {
 `, `package main
 
 import (
-	fmt "fmt"
-	iox "github.com/goplus/gop/builtin/iox"
-	io "io"
+	"fmt"
+	"github.com/goplus/gop/builtin/iox"
+	"io"
 )
 
 var r io.Reader
@@ -299,9 +299,9 @@ println addSafe("10", "abc")
 `, `package main
 
 import (
-	fmt "fmt"
-	strconv "strconv"
-	errors "github.com/qiniu/x/errors"
+	"fmt"
+	"strconv"
+	"github.com/qiniu/x/errors"
 )
 
 func add(x string, y string) (int, error) {
@@ -367,8 +367,8 @@ func TestSpx(t *testing.T) {
 	gopClTestEx(t, "main.tspx", `println "hi"`, `package main
 
 import (
-	fmt "fmt"
-	spx "github.com/goplus/gop/cl/internal/spx"
+	"fmt"
+	"github.com/goplus/gop/cl/internal/spx"
 )
 
 type MyGame struct {
@@ -385,8 +385,8 @@ func main() {
 	gopClTestEx(t, "Cat.tspx", `println "hi"`, `package main
 
 import (
-	fmt "fmt"
-	spx "github.com/goplus/gop/cl/internal/spx"
+	"fmt"
+	"github.com/goplus/gop/cl/internal/spx"
 )
 
 type Cat struct {
@@ -441,7 +441,7 @@ func TestFromTestdata(t *testing.T) {
 func TestFS(t *testing.T) {
 	var expect = []byte(`package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println("Go+")
@@ -459,7 +459,7 @@ func main() {
 func TestAst(t *testing.T) {
 	var expect = []byte(`package main
 
-import fmt "fmt"
+import "fmt"
 
 func main() {
 	fmt.Println("Go+")