Source File
exports.go
Belonging Package
go/doc
package doc
import (
)
func ( []*ast.Ident) []*ast.Ident {
:= 0
for , := range {
if token.IsExported(.Name) {
[] =
++
}
}
return [0:]
}
var underscore = ast.NewIdent("_")
func ( *ast.CompositeLit, Filter, bool) {
:= len(.Elts)
.Elts = filterExprList(.Elts, , )
if len(.Elts) < {
.Incomplete = true
}
}
func ( []ast.Expr, Filter, bool) []ast.Expr {
:= 0
for , := range {
switch x := .(type) {
case *ast.CompositeLit:
filterCompositeLit(, , )
case *ast.KeyValueExpr:
if , := .Key.(*ast.Ident); && !(.Name) {
continue
}
if , := .Value.(*ast.CompositeLit); {
filterCompositeLit(, , )
}
}
[] =
++
}
return [0:]
}
func ( []*ast.Ident) ( bool) {
for , := range {
if token.IsExported(.Name) {
= true
} else {
[] = underscore
}
}
return
}
func ( *ast.InterfaceType) {
:= .Methods.List // we know that ityp.Methods != nil
:= 0
for , := range {
:= true
if , := baseTypeName(.Type); == "error" {
= false
}
}
if {
[] =
++
}
}
if < len() {
.Incomplete = true
}
.Methods.List = [0:]
}
:= .recordAnonymousField(, .Type)
if token.IsExported() {
= true
case *ast.ParenExpr:
.(nil, .X)
case *ast.ArrayType:
.(nil, .Elt)
case *ast.StructType:
if .filterFieldList(, .Fields, nil) {
.Incomplete = true
}
case *ast.FuncType:
.filterParamList(.Params)
.filterParamList(.Results)
case *ast.InterfaceType:
if .filterFieldList(, .Methods, ) {
.Incomplete = true
}
case *ast.MapType:
.(nil, .Key)
.(nil, .Value)
case *ast.ChanType:
.(nil, .Value)
}
}
func ( *reader) ( ast.Spec) bool {
switch s := .(type) {
return true
case *ast.ValueSpec:
.Values = filterExprList(.Values, token.IsExported, true)
if updateIdentList(.Names) {
.filterType(nil, .Type)
return true
}
} else {
.Names = filterIdentList(.Names)
if len(.Names) > 0 {
.filterType(nil, .Type)
return true
}
}
case *ast.TypeSpec:
if := .Name.Name; token.IsExported() {
.filterType(.lookupType(.Name.Name), .Type)
return true
.Type = copyConstType(, .Pos())
}
return token.IsExported(.Name.Name)
}
return false
}
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |