Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for filterIdentList (0.11 sec)

  1. src/go/doc/exports.go

    // This file implements export filtering of an AST.
    
    package doc
    
    import (
    	"go/ast"
    	"go/token"
    )
    
    // filterIdentList removes unexported names from list in place
    // and returns the resulting list.
    func filterIdentList(list []*ast.Ident) []*ast.Ident {
    	j := 0
    	for _, x := range list {
    		if token.IsExported(x.Name) {
    			list[j] = x
    			j++
    		}
    	}
    	return list[0:j]
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 01 18:18:07 UTC 2022
    - 8.5K bytes
    - Viewed (0)
  2. src/go/ast/filter.go

    	return filterPackage(pkg, exportFilter, true)
    }
    
    // ----------------------------------------------------------------------------
    // General filtering
    
    type Filter func(string) bool
    
    func filterIdentList(list []*Ident, f Filter) []*Ident {
    	j := 0
    	for _, x := range list {
    		if f(x.Name) {
    			list[j] = x
    			j++
    		}
    	}
    	return list[0:j]
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 13.3K bytes
    - Viewed (0)
Back to top