Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alexkohler/nargs
/ functions
Functions
40 in github.com/alexkohler/nargs
⨍
Functions
40
◇
Types & classes
5
↓ 16 callers
Method
handleExprs
(paramMap map[string]bool, exprList []ast.Expr, stmtList []ast.Stmt)
nargs.go:292
↓ 6 callers
Function
handleIdent
(paramMap map[string]bool, ident *ast.Ident)
nargs.go:269
↓ 3 callers
Function
handleFieldList
( paramMap map[string]bool, fieldList *ast.FieldList, exprList []ast.Expr, stmtList []ast.Stmt, )
nargs.go:383
↓ 3 callers
Method
handleStmts
(paramMap map[string]bool, stmtList []ast.Stmt)
nargs.go:160
↓ 2 callers
Function
CheckForUnusedFunctionArgs
CheckForUnusedFunctionArgs will parse the files/packages contained in args and walk the AST searching for unused function parameters.
nargs.go:41
↓ 2 callers
Function
allPackages
allPackages returns all the packages that can be found under the $GOPATH directories and $GOROOT matching pattern. The pattern is either "all" (all pa
import.go:226
↓ 2 callers
Function
allPackagesInFS
allPackagesInFS is like allPackages but is passed a pattern beginning ./ or ../, meaning it should scan the tree rooted at the given directory. There
import.go:338
↓ 2 callers
Method
handleDecls
(paramMap map[string]bool, decls []ast.Decl, initialStmts []ast.Stmt)
nargs.go:400
↓ 2 callers
Method
handleFuncDecl
( paramMap map[string]bool, funcDecl *ast.FuncDecl, initialStmts []ast.Stmt, )
nargs.go:479
↓ 2 callers
Method
handleFuncLit
paramMap is passed in for cases where we have an outer function with a parameter that is captured by closure by the function literal
nargs.go:445
↓ 2 callers
Function
handleIdents
(paramMap map[string]bool, identList []*ast.Ident)
nargs.go:263
↓ 2 callers
Function
isDir
(filename string)
import.go:113
↓ 2 callers
Function
matchPattern
matchPattern(pattern)(name) reports whether name matches pattern. Pattern is a limited glob pattern in which '...' means 'any string' and there is no
import.go:178
↓ 1 callers
Function
exists
(filename string)
import.go:118
↓ 1 callers
Function
hasPathPrefix
hasPathPrefix reports whether the path s begins with the elements in prefix.
import.go:193
↓ 1 callers
Function
importPaths
importPaths returns the import paths to use for the given command line.
import.go:157
↓ 1 callers
Function
importPathsNoDotExpansion
importPathsNoDotExpansion returns the import paths to use for the given command line, but it does no ... expansion.
import.go:125
↓ 1 callers
Function
matchPackages
(pattern string)
import.go:234
↓ 1 callers
Function
matchPackagesInFS
(pattern string)
import.go:346
↓ 1 callers
Function
parseInput
(args []string, fset *token.FileSet, includeTests bool)
import.go:29
↓ 1 callers
Function
treeCanMatchPattern
treeCanMatchPattern(pattern)(name) reports whether name or children of name can possibly match pattern. Pattern is the same limited glob accepted by m
import.go:210
Function
FuncVars
(x int)
testdata/success.go:9
Method
Len
()
nargs.go:80
Method
Less
(i, j int)
nargs.go:81
Method
Swap
(i, j int)
nargs.go:91
Function
TestCheckForUnusedFunctionArgs
(t *testing.T)
nargs_test.go:8
Method
Visit
Visit implements the ast.Visitor Visit method.
nargs.go:94
Function
funcFour
Unused named returns. Unused named returns are NOT flagged by deault. Flagging unused named returns can be enabled by setting the -named_returns flag
testdata/test.go:25
Function
funcOne
Unused function parameter on function
testdata/test.go:6
Method
funcThree
Unused function receiver. Unused receivers are NOT flagged by default. Flagging unused function receivers can be enabled by setting the -receivers fla
testdata/test.go:19
Method
funcTwo
(x int, y int, z int)
testdata/test.go:13
Function
init
()
nargs.go:14
Function
main
()
testdata/success.go:5
Function
main
()
cmd/nargs/main.go:19
Function
newTypePair
()
testdata/success.go:16
Function
testIndexListExpr
()
testdata/success.go:19
Function
unusedClosureParamInsideFunction
Unused closure parameters inside function
testdata/test.go:30
Function
unusedFunc
Unused function as parameter
testdata/test.go:39
Function
usage
()
cmd/nargs/main.go:11
Function
variableCapturedByClosure
(r int)
testdata/test.go:47