We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed304ef commit 03de06fCopy full SHA for 03de06f
misc.go
@@ -12,12 +12,12 @@ type importer interface {
12
ImportName(path string, src string) (name string, goroot bool)
13
}
14
15
-// typeName 解析表达式获取类型名字以及是否是导入的
+// typeName Parses the expression to get the type name and whether it is imported
16
func typeName(x ast.Expr) (name string, imported bool) {
17
switch t := x.(type) {
18
- case *ast.Ident: // 当前包定义的
+ case *ast.Ident: // Defined by the current package
19
return t.Name, false
20
- case *ast.SelectorExpr: // 外部导入的
+ case *ast.SelectorExpr: // Defined by the imported
21
if _, ok := t.X.(*ast.Ident); ok {
22
return t.Sel.Name, true
23
0 commit comments