Repository: goplus/gop
Pull request #910 (2021-11-19 09:56:39)

mv tutorial => https://github.com/goplus/tutorial


Patch:
diff --git a/.gitignore b/.gitignore
index 8eb1441e..d543e4a1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,7 +32,7 @@ coverage.txt
 
 .gop/
 gop_autogen.go
-gop_autogen*_test.go
+gop_autogen*.go
 go.json
 *.cache
 
diff --git a/LICENSE b/LICENSE
index c6915742..2a4a1745 100644
--- a/LICENSE
+++ b/LICENSE
@@ -186,7 +186,7 @@ Apache License
       same "printed page" as the copyright notice for easier
       identification within third-party archives.
 
-   Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
+   Copyright 2020 The GoPlus Authors (goplus.org)
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
diff --git a/README.md b/README.md
index 5f5935ef..11e82279 100644
--- a/README.md
+++ b/README.md
@@ -90,9 +90,9 @@ fmt.Println("x:", x)
 
 **And all Go+ packages can also be imported in Go programs. What you need to do is just using `gop` command instead of `go`.**
 
-First, let's make a directory named `tutorial/14-Using-goplus-in-Go`.
+First, let's make a directory named `14-Using-goplus-in-Go`.
 
-Then write a Go+ package named `foo` in it:
+Then write a Go+ package named [foo](https://github.com/goplus/tutorial/tree/main/14-Using-goplus-in-Go/foo) in it:
 
 ```go
 package foo
@@ -102,7 +102,7 @@ func ReverseMap(m map[string]int) map[int]string {
 }
 ```
 
-Then use it in a Go package (14-Using-goplus-in-Go/gomain):
+Then use it in a Go package [14-Using-goplus-in-Go/gomain](https://github.com/goplus/tutorial/tree/main/14-Using-goplus-in-Go/gomain):
 
 ```go
 package main
@@ -110,7 +110,7 @@ package main
 import (
     "fmt"
 
-    "github.com/goplus/gop/tutorial/14-Using-goplus-in-Go/foo"
+    "github.com/goplus/tutorial/14-Using-goplus-in-Go/foo"
 )
 
 func main() {
@@ -125,13 +125,7 @@ How to build this example? You can use:
 gop install -v ./...
 ```
 
-or:
-
-```
-gop run tutorial/14-Using-goplus-in-Go/gomain
-```
-
-Go [tutorial/14-Using-goplus-in-Go](https://github.com/goplus/gop/tree/main/tutorial/14-Using-goplus-in-Go) to get the source code.
+Go [github.com/goplus/tutorial/14-Using-goplus-in-Go](https://github.com/goplus/tutorial/tree/main/14-Using-goplus-in-Go) to get the source code.
 
 
 ## Playground
@@ -147,7 +141,7 @@ Go+ Jupyter kernel:
 
 ## Tutorials
 
-See https://github.com/goplus/gop/tree/main/tutorial
+See https://github.com/goplus/tutorial
 
 
 ## Bytecode vs. Go code
@@ -467,7 +461,7 @@ add("10", "abc"): 0 strconv.Atoi: parsing "abc": invalid syntax
 
 ===> errors stack:
 main.add("10", "abc")
-    /Users/xsw/goplus/tutorial/15-ErrWrap/err_wrap.gop:6 strconv.Atoi(y)?
+    /Users/xsw/tutorial/15-ErrWrap/err_wrap.gop:6 strconv.Atoi(y)?
 
 addSafe("10", "abc"): 10
 ```
@@ -529,7 +523,7 @@ println([k for k, _ <- m])
 println([v for v <- m])
 ```
 
-Go [tutorial/20-Unix-Shebang/shebang](https://github.com/goplus/gop/blob/main/tutorial/20-Unix-Shebang/shebang) to get the source code.
+Go [20-Unix-Shebang/shebang](https://github.com/goplus/tutorial/blob/main/20-Unix-Shebang/shebang) to get the source code.
 
 
 ### Go features
diff --git a/README_zh.md b/README_zh.md
index 9081ccb3..bc8a79b0 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -179,7 +179,7 @@ igop  # 运行一个 Go+ 程序
 
 ### 有理数：bigint，bigrat，bigfloat
 
-我们将有理数作为原生 Go+ 类型引入。我们使用后缀 `r` 来表示有理数字面量。例如，（1r << 200）表示值等于2<sup>200 </sup>的 big int 型整数。4/5r 表示有理常数 4/5。
+我们将有理数作为原生 Go+ 类型引入。我们使用后缀 `r` 来表示有理数字面量。例如，（1r << 200）表示值等于2<sup>200 </sup>的 big int 型整数。4/5r 表示有理常数 4/5。
 
 ```go
 var a bigint = 1r << 65  // bigint, large than int64
@@ -548,4 +548,4 @@ git config --global user.email XXX@goplus.org
 * [![Issues](https://img.shields.io/badge/ISSUEs-NumGo+-blue.svg)](https://github.com/numgoplus/ng/issues)
 * [![Issues](https://img.shields.io/badge/ISSUEs-PandasGo+-blue.svg)](https://github.com/goplus/pandas/issues)
 * [![Issues](https://img.shields.io/badge/ISSUEs-vscode%20Go+-blue.svg)](https://github.com/gopcode/vscode-goplus/issues)
-* [![TODOs](https://badgen.net/https/api.tickgit.com/badgen/github.com/goplus/gop)](https://www.tickgit.com/browse?repo=github.com/goplus/gop)
+* [![TODOs](https://badgen.net/https/api.tickgit.com/badgen/github.com/goplus/gop)](https://www.tickgit.com/browse?repo=github.com/goplus/gop)
\ No newline at end of file
diff --git a/all.bash b/all.bash
index 6d340657..bf23bdbd 100755
--- a/all.bash
+++ b/all.bash
@@ -1,21 +1,5 @@
 #! /usr/bin/env bash
 
-#
-# Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
 set -e
 
 GOP_ROOT=$(pwd)
@@ -78,31 +62,6 @@ link_gop_root_dir() {
   echo "$GOP_ROOT linked to $GOP_HOME_DIR successfully!"
 }
 
-build_go_plus_tutorials() {
-  command_exists gop || {
-    if [ -n "$GOPATH" ]; then
-      MANUAL_EXPORT_COMMAND="$ADD_GOPATH_COMMAND"
-      echo "Execute command: $ADD_GOPATH_COMMAND"
-      export PATH=$PATH:$GOPATH/bin
-    else
-      MANUAL_EXPORT_COMMAND="$ADD_GO_BIN_COMMAND"
-      echo "Execute command: $ADD_GO_BIN_COMMAND"
-      export PATH=$PATH:$HOME/go/bin
-    fi
-  }
-
-  command_exists gop || {
-    echo "Error: something wrong, you could create a new issue on https://github.com/goplus/gop/issues, we will help you."
-    exit 1
-  }
-
-  cd $GOP_ROOT
-
-  echo "Building all Go+ tutorials."
-  gop install -ldflags "${GO_FLAGS}" ./...
-  echo "Go+ tutorials builded successfully!"
-}
-
 summary() {
   echo "Installation Summary:"
   echo "Go+ is now installed."
@@ -121,28 +80,6 @@ EOF
   fi
 }
 
-hello_world() {
-  HELLO_WORLD_COMMAND="gop run tutorial/01-Hello-world/hello.gop"
-
-  cd $GOP_ROOT
-
-  EXPORT_CMD=""
-  if [ -n "$MANUAL_EXPORT_COMMAND" ]; then
-    EXPORT_CMD="${MANUAL_EXPORT_COMMAND} && "
-  fi
-
-  echo '-----------------------------'
-  cat <<-EOF
-Let's have a try now, Copy below command to get classic Hello, world!
-
-${EXPORT_CMD}${HELLO_WORLD_COMMAND}
-
-Besides, there are another more tutorials listed under ./tutorial/ directory.
-
-Have fun!
-EOF
-}
-
 gop_test() {
   echo "Running gop test"
   cd $GOP_ROOT
@@ -160,14 +97,8 @@ default() {
   # Link Gop root directory to home/ dir
   link_gop_root_dir
 
-  # Build all Go+ tutorials
-  build_go_plus_tutorials
-
   # Summary
   summary
-
-  # hello world
-  hello_world
 }
 
 if [ "$#" -eq 0 ]; then
diff --git a/ast/ast.go b/ast/ast.go
index 95029af1..fd0c0938 100644
--- a/ast/ast.go
+++ b/ast/ast.go
@@ -1,18 +1,6 @@
-/*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
 
 // Package ast declares the types used to represent syntax trees for Go+
 // packages.
diff --git a/ast/ast_gop.go b/ast/ast_gop.go
index 038e545f..ea41f72c 100644
--- a/ast/ast_gop.go
+++ b/ast/ast_gop.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2020 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package ast
 
diff --git a/ast/commentmap.go b/ast/commentmap.go
index 8cebf7e1..a336a378 100644
--- a/ast/commentmap.go
+++ b/ast/commentmap.go
@@ -1,18 +1,6 @@
-/*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
 
 package ast
 
diff --git a/ast/filter.go b/ast/filter.go
index 3f5b3cdd..1845cbb7 100644
--- a/ast/filter.go
+++ b/ast/filter.go
@@ -1,18 +1,6 @@
-/*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
 
 package ast
 
diff --git a/ast/gopq/gop_dom.go b/ast/gopq/gop_dom.go
index 19ba2add..3bb33dec 100644
--- a/ast/gopq/gop_dom.go
+++ b/ast/gopq/gop_dom.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package gopq
 
diff --git a/ast/gopq/gop_query.go b/ast/gopq/gop_query.go
index b0b28858..cee5806a 100644
--- a/ast/gopq/gop_query.go
+++ b/ast/gopq/gop_query.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package gopq
 
diff --git a/ast/import.go b/ast/import.go
index a6ce862f..ea377cc5 100644
--- a/ast/import.go
+++ b/ast/import.go
@@ -1,18 +1,6 @@
-/*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
 
 package ast
 
diff --git a/ast/print.go b/ast/print.go
index de68a208..f02c46d6 100644
--- a/ast/print.go
+++ b/ast/print.go
@@ -1,18 +1,6 @@
-/*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
 
 // This file contains printing support for ASTs.
 
diff --git a/ast/resolve.go b/ast/resolve.go
index 437f35e8..c50ceb83 100644
--- a/ast/resolve.go
+++ b/ast/resolve.go
@@ -1,18 +1,6 @@
-/*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
 
 // This file implements NewPackage.
 
diff --git a/ast/scope.go b/ast/scope.go
index 38d7d0a5..60d0b473 100644
--- a/ast/scope.go
+++ b/ast/scope.go
@@ -1,18 +1,6 @@
-/*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
 
 // This file implements scopes and the objects they contain.
 
diff --git a/ast/walk.go b/ast/walk.go
index e77558d1..2917ea02 100644
--- a/ast/walk.go
+++ b/ast/walk.go
@@ -1,18 +1,6 @@
-/*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
 
 package ast
 
diff --git a/build/build.go b/build/build.go
index 54976067..7f73dbdd 100644
--- a/build/build.go
+++ b/build/build.go
@@ -1,19 +1,3 @@
-/*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
 package build
 
 import (
diff --git a/builtin/big.go b/builtin/big.go
index 6e83bbac..ae29c0e4 100644
--- a/builtin/big.go
+++ b/builtin/big.go
@@ -1,18 +1,15 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+     http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package builtin
 
diff --git a/builtin/range.go b/builtin/range.go
index 5bd98c60..a6f2cc0c 100644
--- a/builtin/range.go
+++ b/builtin/range.go
@@ -1,18 +1,15 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+     http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package builtin
 
diff --git a/cl/builtin.go b/cl/builtin.go
index 35cdb1b3..61b16f3c 100644
--- a/cl/builtin.go
+++ b/cl/builtin.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package cl
 
diff --git a/cl/classfile.go b/cl/classfile.go
index ee61472d..169c7555 100644
--- a/cl/classfile.go
+++ b/cl/classfile.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package cl
 
diff --git a/cl/compile.go b/cl/compile.go
index b49bb941..4e0825c3 100644
--- a/cl/compile.go
+++ b/cl/compile.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 // Package cl compiles Go+ syntax trees (ast).
 package cl
diff --git a/cl/expr.go b/cl/expr.go
index 21021a90..8b5473cf 100644
--- a/cl/expr.go
+++ b/cl/expr.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package cl
 
diff --git a/cl/func_type_and_var.go b/cl/func_type_and_var.go
index 0e54d2b6..d44513c9 100644
--- a/cl/func_type_and_var.go
+++ b/cl/func_type_and_var.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package cl
 
@@ -125,8 +125,6 @@ func toType(ctx *blockCtx, typ ast.Expr) types.Type {
 		return toFuncType(ctx, v, nil)
 	case *ast.SelectorExpr:
 		return toExternalType(ctx, v)
-	case *ast.ParenExpr:
-		return toType(ctx, v.X)
 	}
 	log.Panicln("toType: unknown -", reflect.TypeOf(typ))
 	return nil
diff --git a/cl/internal/spx/game.go b/cl/internal/spx/game.go
index f2f8c356..969b0fcb 100644
--- a/cl/internal/spx/game.go
+++ b/cl/internal/spx/game.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package spx
 
diff --git a/cl/internal/spx/sprite.go b/cl/internal/spx/sprite.go
index bcd4c2cd..87f7a417 100644
--- a/cl/internal/spx/sprite.go
+++ b/cl/internal/spx/sprite.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package spx
 
diff --git a/cl/internal/spx2/spx2.go b/cl/internal/spx2/spx2.go
index d4884379..5b33a018 100644
--- a/cl/internal/spx2/spx2.go
+++ b/cl/internal/spx2/spx2.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package spx2
 
diff --git a/cl/packages.go b/cl/packages.go
index 9ba4da27..0d64ccec 100644
--- a/cl/packages.go
+++ b/cl/packages.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package cl
 
diff --git a/cl/stmt.go b/cl/stmt.go
index 6c61904e..722d6c4b 100644
--- a/cl/stmt.go
+++ b/cl/stmt.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package cl
 
diff --git a/cmd/gengo/gen.go b/cmd/gengo/gen.go
index 60e50acc..1956f17d 100644
--- a/cmd/gengo/gen.go
+++ b/cmd/gengo/gen.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package gengo
 
diff --git a/cmd/gop/main.go b/cmd/gop/main.go
index ee266798..9d3b5ef0 100644
--- a/cmd/gop/main.go
+++ b/cmd/gop/main.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package main
 
diff --git a/cmd/gopfmt/gopfmt.go b/cmd/gopfmt/gopfmt.go
index afadf841..b1c7a0ea 100644
--- a/cmd/gopfmt/gopfmt.go
+++ b/cmd/gopfmt/gopfmt.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package main
 
diff --git a/cmd/internal/base/base.go b/cmd/internal/base/base.go
index a5ebca0c..133e5312 100644
--- a/cmd/internal/base/base.go
+++ b/cmd/internal/base/base.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 // Package base defines shared basic pieces of the gop command,
 // in particular logging and the Command structure.
diff --git a/cmd/internal/base/gocmd.go b/cmd/internal/base/gocmd.go
index 968d9c96..fba0bcfc 100644
--- a/cmd/internal/base/gocmd.go
+++ b/cmd/internal/base/gocmd.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package base
 
diff --git a/cmd/internal/build/build.go b/cmd/internal/build/build.go
index 74c8b61d..04b92928 100644
--- a/cmd/internal/build/build.go
+++ b/cmd/internal/build/build.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 // Package build implements the ``gop build'' command.
 package build
diff --git a/cmd/internal/clean/clean.go b/cmd/internal/clean/clean.go
index cac9e97b..32c58c89 100644
--- a/cmd/internal/clean/clean.go
+++ b/cmd/internal/clean/clean.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021-2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package clean
 
diff --git a/cmd/internal/gengo/go.go b/cmd/internal/gengo/go.go
index 9701f300..8a4448a3 100644
--- a/cmd/internal/gengo/go.go
+++ b/cmd/internal/gengo/go.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021-2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 // Package gengo implements the ``gop go'' command.
 package gengo
diff --git a/cmd/internal/gopfmt/fmt.go b/cmd/internal/gopfmt/fmt.go
index 164085a1..d9b3b2d2 100644
--- a/cmd/internal/gopfmt/fmt.go
+++ b/cmd/internal/gopfmt/fmt.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 // Package gopfmt implements the ``gop fmt'' command.
 package gopfmt
diff --git a/cmd/internal/help/help.go b/cmd/internal/help/help.go
index 52468310..11e6a35f 100644
--- a/cmd/internal/help/help.go
+++ b/cmd/internal/help/help.go
@@ -1,18 +1,6 @@
-/*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
 
 // Package help implements the ``go help'' command.
 package help
diff --git a/cmd/internal/install/install.go b/cmd/internal/install/install.go
index b79d9815..ab1a4eeb 100644
--- a/cmd/internal/install/install.go
+++ b/cmd/internal/install/install.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 // Package install implements the ``gop install'' command.
 package install
diff --git a/cmd/internal/run/run.go b/cmd/internal/run/run.go
index c2d535f2..1f6b3f0d 100644
--- a/cmd/internal/run/run.go
+++ b/cmd/internal/run/run.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 // Package run implements the ``gop run'' command.
 package run
diff --git a/cmd/internal/version/ver.go b/cmd/internal/version/ver.go
index 1459ea30..01059ba3 100644
--- a/cmd/internal/version/ver.go
+++ b/cmd/internal/version/ver.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package version
 
diff --git a/format/format.go b/format/format.go
index 9e05c16a..017df516 100644
--- a/format/format.go
+++ b/format/format.go
@@ -1,18 +1,6 @@
-/*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
 
 // Package format implements standard formatting of Go+ source.
 //
diff --git a/format/internal.go b/format/internal.go
index 9799e0a2..c0a7186f 100644
--- a/format/internal.go
+++ b/format/internal.go
@@ -1,18 +1,6 @@
-/*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
 
 // TODO(gri): This file and the file src/cmd/gofmt/internal.go are
 // the same (but for this comment and the package name). Do not modify
diff --git a/parser/interface.go b/parser/interface.go
index 408e621b..60504909 100644
--- a/parser/interface.go
+++ b/parser/interface.go
@@ -1,18 +1,6 @@
-/*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
 
 // This file contains the exported entry points for invoking the parser.
 
diff --git a/parser/parser.go b/parser/parser.go
index 09411fa2..dc0ff6eb 100644
--- a/parser/parser.go
+++ b/parser/parser.go
@@ -1,18 +1,6 @@
-/*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
 
 // Package parser implements a parser for Go+ source files. Input may be
 // provided in a variety of forms (see the various Parse* functions); the
diff --git a/parser/parser_gop.go b/parser/parser_gop.go
index 832bfcb2..a4738935 100644
--- a/parser/parser_gop.go
+++ b/parser/parser_gop.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package parser
 
diff --git a/printer/nodes.go b/printer/nodes.go
index ce9b8676..d60a21f1 100644
--- a/printer/nodes.go
+++ b/printer/nodes.go
@@ -1,18 +1,22 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
 
 // This file implements printing of AST nodes; specifically
 // expressions, statements, declarations, and files. It uses
diff --git a/printer/printer.go b/printer/printer.go
index 0090801c..64f418cf 100644
--- a/printer/printer.go
+++ b/printer/printer.go
@@ -1,18 +1,6 @@
-/*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
 
 // Package printer implements printing of AST nodes.
 package printer
diff --git a/scanner/errors.go b/scanner/errors.go
index 6fd5da0b..add5d2ac 100644
--- a/scanner/errors.go
+++ b/scanner/errors.go
@@ -1,18 +1,6 @@
-/*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
 
 package scanner
 
diff --git a/scanner/scanner.go b/scanner/scanner.go
index cc8d29a6..03d8da58 100644
--- a/scanner/scanner.go
+++ b/scanner/scanner.go
@@ -1,18 +1,6 @@
-/*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
 
 // Package scanner implements a scanner for Go+ source text.
 // It takes a []byte as source which can then be tokenized
diff --git a/token/token.go b/token/token.go
index 7a32cff2..4ee0974f 100644
--- a/token/token.go
+++ b/token/token.go
@@ -1,18 +1,6 @@
-/*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
 
 // Package token defines constants representing the lexical tokens of the Go+
 // programming language and basic operations on tokens (printing, predicates).
diff --git a/token/types.go b/token/types.go
index a10efe50..435e0ceb 100644
--- a/token/types.go
+++ b/token/types.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2020 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package token
 
diff --git a/tutorial/01-Hello-world/hello.gop b/tutorial/01-Hello-world/hello.gop
deleted file mode 100644
index 57e9dadd..00000000
--- a/tutorial/01-Hello-world/hello.gop
+++ /dev/null
@@ -1,1 +0,0 @@
-println("Hello, world!")
diff --git a/tutorial/14-Using-goplus-in-Go/gomain/main.go b/tutorial/14-Using-goplus-in-Go/gomain/main.go
deleted file mode 100644
index 5f92747f..00000000
--- a/tutorial/14-Using-goplus-in-Go/gomain/main.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package main
-
-import (
-	"fmt"
-
-	"github.com/goplus/gop/tutorial/14-Using-goplus-in-Go/foo"
-)
-
-func main() {
-	rmap := foo.ReverseMap(map[string]int{"Hi": 1, "Hello": 2})
-	fmt.Println(rmap)
-}
diff --git a/version.go b/version.go
index d4eab4c7..5e578ecf 100644
--- a/version.go
+++ b/version.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package gop
 


Test patch:
diff --git a/ast/goptest/gopq.go b/ast/goptest/gopq.go
index b51182b1..0f69e95d 100644
--- a/ast/goptest/gopq.go
+++ b/ast/goptest/gopq.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package goptest
 
diff --git a/cl/builtin_test.go b/cl/builtin_test.go
index 8025f6f0..12aadaf9 100644
--- a/cl/builtin_test.go
+++ b/cl/builtin_test.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package cl
 
diff --git a/cl/compile_spx_test.go b/cl/compile_spx_test.go
index db874b23..8ea24023 100644
--- a/cl/compile_spx_test.go
+++ b/cl/compile_spx_test.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package cl_test
 
diff --git a/cl/compile_test.go b/cl/compile_test.go
index 71b6bcab..5ac3e47d 100644
--- a/cl/compile_test.go
+++ b/cl/compile_test.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package cl_test
 
@@ -23,8 +23,6 @@ import (
 	"syscall"
 	"testing"
 
-	"golang.org/x/tools/go/packages"
-
 	"github.com/goplus/gop/cl"
 	"github.com/goplus/gop/cmd/gengo"
 	"github.com/goplus/gop/parser"
@@ -2971,9 +2969,9 @@ var (
 )
 
 func removeAutogenFiles() {
-	os.Remove("../tutorial/14-Using-goplus-in-Go/foo/gop_autogen.go")
-	os.Remove("../tutorial/14-Using-goplus-in-Go/foo/gop_autogen_test.go")
-	os.Remove("../tutorial/14-Using-goplus-in-Go/foo/gop_autogen2_test.go")
+	os.Remove("./internal/gop-in-go/foo/gop_autogen.go")
+	os.Remove("./internal/gop-in-go/foo/gop_autogen_test.go")
+	os.Remove("./internal/gop-in-go/foo/gop_autogen2_test.go")
 }
 
 func TestImportGopPkg(t *testing.T) {
@@ -2981,7 +2979,7 @@ func TestImportGopPkg(t *testing.T) {
 	defer autogen.Unlock()
 
 	removeAutogenFiles()
-	gopClTest(t, `import "github.com/goplus/gop/tutorial/14-Using-goplus-in-Go/foo"
+	gopClTest(t, `import "github.com/goplus/gop/cl/internal/gop-in-go/foo"
 
 rmap := foo.ReverseMap(map[string]int{"Hi": 1, "Hello": 2})
 println(rmap)
@@ -2989,7 +2987,7 @@ println(rmap)
 
 import (
 	fmt "fmt"
-	foo "github.com/goplus/gop/tutorial/14-Using-goplus-in-Go/foo"
+	foo "github.com/goplus/gop/cl/internal/gop-in-go/foo"
 )
 
 func main() {
@@ -2999,31 +2997,6 @@ func main() {
 `)
 }
 
-// bugfix (only depends order of testing functions)
-// vet: open tutorial/14-Using-goplus-in-Go/foo/gop_autogen.go: no such file or directory
-func TestGopkgDep(t *testing.T) {
-	autogen.Lock()
-	defer autogen.Unlock()
-
-	removeAutogenFiles()
-	const (
-		loadTypes = packages.NeedImports | packages.NeedDeps | packages.NeedTypes
-		loadModes = loadTypes | packages.NeedName | packages.NeedModule
-	)
-	loadConf := &packages.Config{Mode: loadModes, Fset: gblFset}
-	pkgs, err := baseConf.Ensure().PkgsLoader.Load(
-		loadConf, "github.com/goplus/gop/tutorial/14-Using-goplus-in-Go/gomain")
-	if err != nil {
-		t.Fatal("PkgsLoader.Load failed:", err)
-	}
-	for _, err = range pkgs[0].Errors {
-		t.Fatal("PkgsLoader.Load failed:", err)
-	}
-	if pkgs[0].Name != "main" {
-		t.Fatal("pkg name:", pkgs[0].Name)
-	}
-}
-
 func TestCallDep(t *testing.T) {
 	const (
 		cachedir  = "../.gop"
@@ -3268,13 +3241,3 @@ func init() {
 }
 `)
 }
-
-func TestParentExpr(t *testing.T) {
-	gopClTest(t, `var t1 *(int)
-var t2 chan (int)
-`, `package main
-
-var t1 *int
-var t2 chan int
-`)
-}
diff --git a/cl/error_msg_test.go b/cl/error_msg_test.go
index a8595c50..23b04c86 100644
--- a/cl/error_msg_test.go
+++ b/cl/error_msg_test.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package cl_test
 
diff --git a/tutorial/14-Using-goplus-in-Go/foo/foo.gop b/cl/internal/gop-in-go/foo/foo.gop
similarity index 100%
rename from tutorial/14-Using-goplus-in-Go/foo/foo.gop
rename to cl/internal/gop-in-go/foo/foo.gop
diff --git a/tutorial/14-Using-goplus-in-Go/foo/foo_test.gop b/cl/internal/gop-in-go/foo/foo_test.gop
similarity index 100%
rename from tutorial/14-Using-goplus-in-Go/foo/foo_test.gop
rename to cl/internal/gop-in-go/foo/foo_test.gop
diff --git a/cl/internal/gop-in-go/foo/footest_test.gop b/cl/internal/gop-in-go/foo/footest_test.gop
new file mode 100644
index 00000000..24284ed9
--- /dev/null
+++ b/cl/internal/gop-in-go/foo/footest_test.gop
@@ -0,0 +1,14 @@
+package foo_test
+
+import (
+	"testing"
+
+	"github.com/goplus/gop/cl/internal/gop-in-go/foo"
+)
+
+func TestReverseMap(t *testing.T) {
+	out := foo.ReverseMap({"b": 2})
+	if len(out) != 1 || out[2] != "b" {
+		t.Fatal("ReverseMap failed:", out)
+	}
+}
diff --git a/cmd/goptestgo/goptestgo.go b/cmd/goptestgo/goptestgo.go
index d25e5ee1..06ce5529 100644
--- a/cmd/goptestgo/goptestgo.go
+++ b/cmd/goptestgo/goptestgo.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package main
 
diff --git a/cmd/internal/test/test.go b/cmd/internal/test/test.go
index 26af4f18..2bd16c93 100644
--- a/cmd/internal/test/test.go
+++ b/cmd/internal/test/test.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021-2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 // Package test implements the ``gop test'' command.
 package test
diff --git a/format/_format_test.go b/format/_format_test.go
index 70beb4f1..18ed15b7 100644
--- a/format/_format_test.go
+++ b/format/_format_test.go
@@ -1,18 +1,6 @@
-/*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
 
 package format
 
@@ -382,21 +370,3 @@ func TestFromTestdata(t *testing.T) {
 		return nil
 	})
 }
-
-func TestFromTutorial(t *testing.T) {
-	dir, err := os.Getwd()
-	if err != nil {
-		t.Fatal("Getwd failed:", err)
-	}
-	dir = filepath.Join(dir, "../tutorial")
-	filepath.Walk(dir, func(path string, info os.FileInfo, err error) error {
-		if err != nil {
-			return err
-		}
-		if !info.IsDir() && filepath.Ext(path) == ".gop" {
-			t.Log(path)
-			testFrom(t, path)
-		}
-		return nil
-	})
-}
diff --git a/parser/_testdata/functype/functype.go b/parser/_testdata/functype/functype.go
index 4b17902d..418bc0ef 100644
--- a/parser/_testdata/functype/functype.go
+++ b/parser/_testdata/functype/functype.go
@@ -1,19 +1,3 @@
-/*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
 type T struct {
 	*T
 	A int `json:"a"`
diff --git a/parser/parser_test.go b/parser/parser_test.go
index eaac2368..ef9870c3 100644
--- a/parser/parser_test.go
+++ b/parser/parser_test.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2020 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package parser
 
diff --git a/parser/parserdir_test.go b/parser/parserdir_test.go
index 63b3efc4..876862be 100644
--- a/parser/parserdir_test.go
+++ b/parser/parserdir_test.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+Copyright 2020 The GoPlus Authors (goplus.org)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+	http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
 
 package parser
 
diff --git a/parser/parsertest/memfs.go b/parser/parsertest/memfs.go
index c46cb3a1..7f0bf695 100644
--- a/parser/parsertest/memfs.go
+++ b/parser/parsertest/memfs.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2020 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package parsertest
 
diff --git a/parser/parsertest/parsertest.go b/parser/parsertest/parsertest.go
index fa8a1c7f..38e0ac53 100644
--- a/parser/parsertest/parsertest.go
+++ b/parser/parsertest/parsertest.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2020 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package parsertest
 
diff --git a/tutorial/02-Var-and-operator/var_and_op.gop b/printer/_testdata/02-Var-and-operator/var_and_op.gop
similarity index 100%
rename from tutorial/02-Var-and-operator/var_and_op.gop
rename to printer/_testdata/02-Var-and-operator/var_and_op.gop
diff --git a/tutorial/03-Import-go-package/import.gop b/printer/_testdata/03-Import-go-package/import.gop
similarity index 100%
rename from tutorial/03-Import-go-package/import.gop
rename to printer/_testdata/03-Import-go-package/import.gop
diff --git a/tutorial/04-Func/func.gop b/printer/_testdata/04-Func/func.gop
similarity index 100%
rename from tutorial/04-Func/func.gop
rename to printer/_testdata/04-Func/func.gop
diff --git a/tutorial/05-Closure/closure.gop b/printer/_testdata/05-Closure/closure.gop
similarity index 100%
rename from tutorial/05-Closure/closure.gop
rename to printer/_testdata/05-Closure/closure.gop
diff --git a/tutorial/06-String-Map-Array-Slice/datastruct.gop b/printer/_testdata/06-String-Map-Array-Slice/datastruct.gop
similarity index 100%
rename from tutorial/06-String-Map-Array-Slice/datastruct.gop
rename to printer/_testdata/06-String-Map-Array-Slice/datastruct.gop
diff --git a/tutorial/07-MapLit/maplit.gop b/printer/_testdata/07-MapLit/maplit.gop
similarity index 100%
rename from tutorial/07-MapLit/maplit.gop
rename to printer/_testdata/07-MapLit/maplit.gop
diff --git a/tutorial/08-SliceLit/slicelit.gop b/printer/_testdata/08-SliceLit/slicelit.gop
similarity index 100%
rename from tutorial/08-SliceLit/slicelit.gop
rename to printer/_testdata/08-SliceLit/slicelit.gop
diff --git a/tutorial/09-IfElse-SwitchCase/flow.gop b/printer/_testdata/09-IfElse-SwitchCase/flow.gop
similarity index 100%
rename from tutorial/09-IfElse-SwitchCase/flow.gop
rename to printer/_testdata/09-IfElse-SwitchCase/flow.gop
diff --git a/tutorial/10-List-comprehension/list_comprehens.gop b/printer/_testdata/10-List-comprehension/list_comprehens.gop
similarity index 100%
rename from tutorial/10-List-comprehension/list_comprehens.gop
rename to printer/_testdata/10-List-comprehension/list_comprehens.gop
diff --git a/tutorial/11-Map-comprehension/map_comprehens.gop b/printer/_testdata/11-Map-comprehension/map_comprehens.gop
similarity index 100%
rename from tutorial/11-Map-comprehension/map_comprehens.gop
rename to printer/_testdata/11-Map-comprehension/map_comprehens.gop
diff --git a/tutorial/12-Select-comprehension/select.gop b/printer/_testdata/12-Select-comprehension/select.gop
similarity index 100%
rename from tutorial/12-Select-comprehension/select.gop
rename to printer/_testdata/12-Select-comprehension/select.gop
diff --git a/tutorial/12-Select-comprehension2/findscore.gop b/printer/_testdata/12-Select-comprehension2/findscore.gop
similarity index 100%
rename from tutorial/12-Select-comprehension2/findscore.gop
rename to printer/_testdata/12-Select-comprehension2/findscore.gop
diff --git a/tutorial/13-Exists-comprehension/exists.gop b/printer/_testdata/13-Exists-comprehension/exists.gop
similarity index 100%
rename from tutorial/13-Exists-comprehension/exists.gop
rename to printer/_testdata/13-Exists-comprehension/exists.gop
diff --git a/printer/_testdata/14-Using-goplus-in-Go/foo/foo.gop b/printer/_testdata/14-Using-goplus-in-Go/foo/foo.gop
new file mode 100644
index 00000000..6bda9ae9
--- /dev/null
+++ b/printer/_testdata/14-Using-goplus-in-Go/foo/foo.gop
@@ -0,0 +1,5 @@
+package foo
+
+func ReverseMap(m map[string]int) map[int]string {
+	return {v: k for k, v <- m}
+}
diff --git a/printer/_testdata/14-Using-goplus-in-Go/foo/foo_test.gop b/printer/_testdata/14-Using-goplus-in-Go/foo/foo_test.gop
new file mode 100644
index 00000000..13882564
--- /dev/null
+++ b/printer/_testdata/14-Using-goplus-in-Go/foo/foo_test.gop
@@ -0,0 +1,12 @@
+package foo
+
+import (
+	"testing"
+)
+
+func TestReverseMap(t *testing.T) {
+	out := ReverseMap({"a": 1})
+	if len(out) != 1 || out[1] != "a" {
+		t.Fatal("ReverseMap failed:", out)
+	}
+}
diff --git a/tutorial/14-Using-goplus-in-Go/foo/footest_test.gop b/printer/_testdata/14-Using-goplus-in-Go/foo/footest_test.gop
similarity index 100%
rename from tutorial/14-Using-goplus-in-Go/foo/footest_test.gop
rename to printer/_testdata/14-Using-goplus-in-Go/foo/footest_test.gop
diff --git a/tutorial/15-ErrWrap/err_wrap.gop b/printer/_testdata/15-ErrWrap/err_wrap.gop
similarity index 100%
rename from tutorial/15-ErrWrap/err_wrap.gop
rename to printer/_testdata/15-ErrWrap/err_wrap.gop
diff --git a/tutorial/16-Fib/fib.gop b/printer/_testdata/16-Fib/fib.gop
similarity index 100%
rename from tutorial/16-Fib/fib.gop
rename to printer/_testdata/16-Fib/fib.gop
diff --git a/tutorial/17-Fibtc/fibtc.gop b/printer/_testdata/17-Fibtc/fibtc.gop
similarity index 100%
rename from tutorial/17-Fibtc/fibtc.gop
rename to printer/_testdata/17-Fibtc/fibtc.gop
diff --git a/tutorial/18-Rational/rational.gop b/printer/_testdata/18-Rational/rational.gop
similarity index 100%
rename from tutorial/18-Rational/rational.gop
rename to printer/_testdata/18-Rational/rational.gop
diff --git a/tutorial/19-IncDec/inc_dec.gop b/printer/_testdata/19-IncDec/inc_dec.gop
similarity index 100%
rename from tutorial/19-IncDec/inc_dec.gop
rename to printer/_testdata/19-IncDec/inc_dec.gop
diff --git a/tutorial/20-Unix-Shebang/shebang b/printer/_testdata/20-Unix-Shebang/shebang
similarity index 100%
rename from tutorial/20-Unix-Shebang/shebang
rename to printer/_testdata/20-Unix-Shebang/shebang
diff --git a/tutorial/21-Break-continue-goto/flow.gop b/printer/_testdata/21-Break-continue-goto/flow.gop
similarity index 100%
rename from tutorial/21-Break-continue-goto/flow.gop
rename to printer/_testdata/21-Break-continue-goto/flow.gop
diff --git a/tutorial/22-For-loop/for.gop b/printer/_testdata/22-For-loop/for.gop
similarity index 100%
rename from tutorial/22-For-loop/for.gop
rename to printer/_testdata/22-For-loop/for.gop
diff --git a/tutorial/23-Defer/defer.gop b/printer/_testdata/23-Defer/defer.gop
similarity index 100%
rename from tutorial/23-Defer/defer.gop
rename to printer/_testdata/23-Defer/defer.gop
diff --git a/tutorial/24-Goroutine/goroutine.gop b/printer/_testdata/24-Goroutine/goroutine.gop
similarity index 100%
rename from tutorial/24-Goroutine/goroutine.gop
rename to printer/_testdata/24-Goroutine/goroutine.gop
diff --git a/tutorial/25-Struct/struct.gop b/printer/_testdata/25-Struct/struct.gop
similarity index 100%
rename from tutorial/25-Struct/struct.gop
rename to printer/_testdata/25-Struct/struct.gop
diff --git a/tutorial/26-Method/method.gop b/printer/_testdata/26-Method/method.gop
similarity index 100%
rename from tutorial/26-Method/method.gop
rename to printer/_testdata/26-Method/method.gop
diff --git a/tutorial/27-Func-Set/func.gop b/printer/_testdata/27-Func-Set/func.gop
similarity index 100%
rename from tutorial/27-Func-Set/func.gop
rename to printer/_testdata/27-Func-Set/func.gop
diff --git a/tutorial/28-Chan/chan.gop b/printer/_testdata/28-Chan/chan.gop
similarity index 100%
rename from tutorial/28-Chan/chan.gop
rename to printer/_testdata/28-Chan/chan.gop
diff --git a/tutorial/29-CompareToNil/ref.gop b/printer/_testdata/29-CompareToNil/ref.gop
similarity index 100%
rename from tutorial/29-CompareToNil/ref.gop
rename to printer/_testdata/29-CompareToNil/ref.gop
diff --git a/tutorial/30-Recover/recover.gop b/printer/_testdata/30-Recover/recover.gop
similarity index 100%
rename from tutorial/30-Recover/recover.gop
rename to printer/_testdata/30-Recover/recover.gop
diff --git a/tutorial/31-Builtin-Typecast/builtin_and_typecast.gop b/printer/_testdata/31-Builtin-Typecast/builtin_and_typecast.gop
similarity index 100%
rename from tutorial/31-Builtin-Typecast/builtin_and_typecast.gop
rename to printer/_testdata/31-Builtin-Typecast/builtin_and_typecast.gop
diff --git a/tutorial/32-Import-gop-package/import_gop_pkg.gop b/printer/_testdata/32-Import-gop-package/import_gop_pkg.gop
similarity index 100%
rename from tutorial/32-Import-gop-package/import_gop_pkg.gop
rename to printer/_testdata/32-Import-gop-package/import_gop_pkg.gop
diff --git a/tutorial/33-Interface/shape.gop b/printer/_testdata/33-Interface/shape.gop
similarity index 100%
rename from tutorial/33-Interface/shape.gop
rename to printer/_testdata/33-Interface/shape.gop
diff --git a/tutorial/34-Type-assert/type_assert.gop b/printer/_testdata/34-Type-assert/type_assert.gop
similarity index 100%
rename from tutorial/34-Type-assert/type_assert.gop
rename to printer/_testdata/34-Type-assert/type_assert.gop
diff --git a/tutorial/35-Chan-select/select.gop b/printer/_testdata/35-Chan-select/select.gop
similarity index 100%
rename from tutorial/35-Chan-select/select.gop
rename to printer/_testdata/35-Chan-select/select.gop
diff --git a/tutorial/36-Auto-Property/autoprop.gop b/printer/_testdata/36-Auto-Property/autoprop.gop
similarity index 100%
rename from tutorial/36-Auto-Property/autoprop.gop
rename to printer/_testdata/36-Auto-Property/autoprop.gop
diff --git a/tutorial/37-Cmdline/cmdline.gop b/printer/_testdata/37-Cmdline/cmdline.gop
similarity index 100%
rename from tutorial/37-Cmdline/cmdline.gop
rename to printer/_testdata/37-Cmdline/cmdline.gop
diff --git a/tutorial/38-Overload-operator/overload_op.gop b/printer/_testdata/38-Overload-operator/overload_op.gop
similarity index 100%
rename from tutorial/38-Overload-operator/overload_op.gop
rename to printer/_testdata/38-Overload-operator/overload_op.gop
diff --git a/tutorial/39-Lambda-expression/lambda.gop b/printer/_testdata/39-Lambda-expression/lambda.gop
similarity index 100%
rename from tutorial/39-Lambda-expression/lambda.gop
rename to printer/_testdata/39-Lambda-expression/lambda.gop
diff --git a/tutorial/40-Deduce-struct-type/deduce.gop b/printer/_testdata/40-Deduce-struct-type/deduce.gop
similarity index 100%
rename from tutorial/40-Deduce-struct-type/deduce.gop
rename to printer/_testdata/40-Deduce-struct-type/deduce.gop
diff --git a/tutorial/41-UDT-RangeForEach/udt_range.gop b/printer/_testdata/41-UDT-RangeForEach/udt_range.gop
similarity index 100%
rename from tutorial/41-UDT-RangeForEach/udt_range.gop
rename to printer/_testdata/41-UDT-RangeForEach/udt_range.gop
diff --git a/tutorial/42-UDT-RangeIterator/udt_range_iter.gop b/printer/_testdata/42-UDT-RangeIterator/udt_range_iter.gop
similarity index 100%
rename from tutorial/42-UDT-RangeIterator/udt_range_iter.gop
rename to printer/_testdata/42-UDT-RangeIterator/udt_range_iter.gop
diff --git a/tutorial/43-RangeExpr/rangeexpr.gop b/printer/_testdata/43-RangeExpr/rangeexpr.gop
similarity index 100%
rename from tutorial/43-RangeExpr/rangeexpr.gop
rename to printer/_testdata/43-RangeExpr/rangeexpr.gop
diff --git a/printer/gop_test.go b/printer/gop_test.go
index 7febec6e..3b3ed837 100644
--- a/printer/gop_test.go
+++ b/printer/gop_test.go
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ Copyright 2021 The GoPlus Authors (goplus.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
 
 package printer_test
 
@@ -116,12 +116,12 @@ func testFrom(t *testing.T, fpath string) {
 	diffBytes(t, res, src)
 }
 
-func TestFromTutorial(t *testing.T) {
+func TestFromTestdata(t *testing.T) {
 	dir, err := os.Getwd()
 	if err != nil {
 		t.Fatal("Getwd failed:", err)
 	}
-	dir = filepath.Join(dir, "../tutorial")
+	dir = filepath.Join(dir, "./_testdata")
 	filepath.Walk(dir, func(path string, info os.FileInfo, err error) error {
 		if err != nil {
 			return err
diff --git a/printer/printer_test.go b/printer/printer_test.go
index be038741..4213e53e 100644
--- a/printer/printer_test.go
+++ b/printer/printer_test.go
@@ -1,18 +1,6 @@
-/*
- * Copyright (c) 2021 The GoPlus Authors (goplus.org). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
 
 package printer