Repository: goplus/gop
Pull request #422 (2020-07-08 02:19:13)

github.com/goplus/gop/gop => github.com/goplus/gop


Patch:
diff --git a/cmd/qexp/gopkg/exporter.go b/cmd/qexp/gopkg/exporter.go
index 870403cf..e26b38cf 100644
--- a/cmd/qexp/gopkg/exporter.go
+++ b/cmd/qexp/gopkg/exporter.go
@@ -63,7 +63,7 @@ type Exporter struct {
 
 // NewExporter creates a go package exporter.
 func NewExporter(w io.Writer, pkg *types.Package) *Exporter {
-	const gopPath = "github.com/goplus/gop/gop"
+	const gopPath = "github.com/goplus/gop"
 	imports := map[string]string{gopPath: "gop"}
 	importPkgs := map[string]string{"gop": gopPath}
 	p := &Exporter{w: w, pkg: pkg, imports: imports, importPkgs: importPkgs}
diff --git a/gop/spec.go b/gop.go
similarity index 100%
rename from gop/spec.go
rename to gop.go
diff --git a/lib/builtin/exports.go b/lib/builtin/exports.go
index 1910fffe..10f51b36 100644
--- a/lib/builtin/exports.go
+++ b/lib/builtin/exports.go
@@ -24,7 +24,7 @@ import (
 	"io"
 	"reflect"
 
-	"github.com/goplus/gop/gop"
+	"github.com/goplus/gop"
 
 	qspec "github.com/goplus/gop/exec.spec"
 	exec "github.com/goplus/gop/exec/bytecode"
diff --git a/lib/errors/errors.go b/lib/errors/errors.go
index c0bdaf1d..e2226b60 100644
--- a/lib/errors/errors.go
+++ b/lib/errors/errors.go
@@ -3,7 +3,7 @@ package errors
 import (
 	"reflect"
 
-	"github.com/goplus/gop/gop"
+	"github.com/goplus/gop"
 	"github.com/qiniu/x/errors"
 )
 
diff --git a/lib/flag/gomod_export.go b/lib/flag/gomod_export.go
index 8f916a68..cdbb7bf2 100644
--- a/lib/flag/gomod_export.go
+++ b/lib/flag/gomod_export.go
@@ -6,8 +6,8 @@ import (
 	io "io"
 	time "time"
 
+	gop "github.com/goplus/gop"
 	qspec "github.com/goplus/gop/exec.spec"
-	gop "github.com/goplus/gop/gop"
 )
 
 func execArg(_ int, p *gop.Context) {
diff --git a/lib/fmt/exports.go b/lib/fmt/exports.go
index 69410612..ecc64a18 100644
--- a/lib/fmt/exports.go
+++ b/lib/fmt/exports.go
@@ -20,7 +20,7 @@ package fmt
 import (
 	"fmt"
 
-	"github.com/goplus/gop/gop"
+	"github.com/goplus/gop"
 	"github.com/goplus/gop/lib/builtin"
 )
 
diff --git a/lib/io/gomod_export.go b/lib/io/gomod_export.go
index 210c84c6..8b05214c 100644
--- a/lib/io/gomod_export.go
+++ b/lib/io/gomod_export.go
@@ -4,7 +4,7 @@ package io
 import (
 	io "io"
 
-	gop "github.com/goplus/gop/gop"
+	gop "github.com/goplus/gop"
 )
 
 func toType0(v interface{}) io.Writer {
diff --git a/lib/io/ioutil/gomod_export.go b/lib/io/ioutil/gomod_export.go
index 12ec7137..cd7d693f 100644
--- a/lib/io/ioutil/gomod_export.go
+++ b/lib/io/ioutil/gomod_export.go
@@ -6,7 +6,7 @@ import (
 	ioutil "io/ioutil"
 	os "os"
 
-	gop "github.com/goplus/gop/gop"
+	gop "github.com/goplus/gop"
 )
 
 func toType0(v interface{}) io.Reader {
diff --git a/lib/log/gomod_export.go b/lib/log/gomod_export.go
index b9f6dde2..3b5922c2 100644
--- a/lib/log/gomod_export.go
+++ b/lib/log/gomod_export.go
@@ -5,8 +5,8 @@ import (
 	io "io"
 	log "log"
 
+	gop "github.com/goplus/gop"
 	qspec "github.com/goplus/gop/exec.spec"
-	gop "github.com/goplus/gop/gop"
 )
 
 func execFlags(_ int, p *gop.Context) {
diff --git a/lib/os/gomod_export.go b/lib/os/gomod_export.go
index 9273925a..91ba1e28 100644
--- a/lib/os/gomod_export.go
+++ b/lib/os/gomod_export.go
@@ -5,8 +5,8 @@ import (
 	os "os"
 	time "time"
 
+	gop "github.com/goplus/gop"
 	qspec "github.com/goplus/gop/exec.spec"
-	gop "github.com/goplus/gop/gop"
 )
 
 func execChdir(_ int, p *gop.Context) {
diff --git a/lib/reflect/gomod_export.go b/lib/reflect/gomod_export.go
index 1f6c79a1..c8e3d181 100644
--- a/lib/reflect/gomod_export.go
+++ b/lib/reflect/gomod_export.go
@@ -5,7 +5,7 @@ import (
 	reflect "reflect"
 	unsafe "unsafe"
 
-	gop "github.com/goplus/gop/gop"
+	gop "github.com/goplus/gop"
 )
 
 func toSlice0(args []interface{}) []reflect.Value {
diff --git a/lib/strconv/gomod_export.go b/lib/strconv/gomod_export.go
index f017927b..8ad04d04 100644
--- a/lib/strconv/gomod_export.go
+++ b/lib/strconv/gomod_export.go
@@ -4,7 +4,7 @@ package strconv
 import (
 	strconv "strconv"
 
-	gop "github.com/goplus/gop/gop"
+	gop "github.com/goplus/gop"
 )
 
 func execAppendBool(_ int, p *gop.Context) {
diff --git a/lib/strings/gomod_export.go b/lib/strings/gomod_export.go
index af6da939..dd6484f9 100644
--- a/lib/strings/gomod_export.go
+++ b/lib/strings/gomod_export.go
@@ -6,7 +6,7 @@ import (
 	strings "strings"
 	unicode "unicode"
 
-	gop "github.com/goplus/gop/gop"
+	gop "github.com/goplus/gop"
 )
 
 func execBuilderString(_ int, p *gop.Context) {
diff --git a/lib/sync/atomic/gomod_export.go b/lib/sync/atomic/gomod_export.go
index c279eb2a..76d859a0 100644
--- a/lib/sync/atomic/gomod_export.go
+++ b/lib/sync/atomic/gomod_export.go
@@ -5,7 +5,7 @@ import (
 	atomic "sync/atomic"
 	unsafe "unsafe"
 
-	gop "github.com/goplus/gop/gop"
+	gop "github.com/goplus/gop"
 )
 
 func execAddInt32(_ int, p *gop.Context) {
diff --git a/lib/sync/gomod_export.go b/lib/sync/gomod_export.go
index 9de1cd8c..a14a6780 100644
--- a/lib/sync/gomod_export.go
+++ b/lib/sync/gomod_export.go
@@ -4,7 +4,7 @@ package sync
 import (
 	sync "sync"
 
-	gop "github.com/goplus/gop/gop"
+	gop "github.com/goplus/gop"
 )
 
 func execCondWait(_ int, p *gop.Context) {


Test patch:
diff --git a/cl/stmt_test.go b/cl/stmt_test.go
index 6a1fa581..3e516546 100644
--- a/cl/stmt_test.go
+++ b/cl/stmt_test.go
@@ -21,8 +21,8 @@ import (
 	"os"
 	"testing"
 
+	"github.com/goplus/gop"
 	"github.com/goplus/gop/ast/asttest"
-	"github.com/goplus/gop/gop"
 	"github.com/goplus/gop/parser"
 	"github.com/goplus/gop/token"
 	"github.com/qiniu/x/log"
diff --git a/cmd/qexp/gopkg/exporter_test.go b/cmd/qexp/gopkg/exporter_test.go
index 229e3320..68193f15 100644
--- a/cmd/qexp/gopkg/exporter_test.go
+++ b/cmd/qexp/gopkg/exporter_test.go
@@ -26,7 +26,7 @@ package strings
 import (
 	strings "strings"
 
-	gop "github.com/goplus/gop/gop"
+	gop "github.com/goplus/gop"
 )
 
 func execNewReplacer(arity int, p *gop.Context) {