Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for checkCopyLocksRangeVar (0.32 sec)

  1. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/copylock/copylock.go

    // might inadvertently copy a lock by checking whether
    // any of the range variables are locks.
    func checkCopyLocksRange(pass *analysis.Pass, r *ast.RangeStmt) {
    	checkCopyLocksRangeVar(pass, r.Tok, r.Key)
    	checkCopyLocksRangeVar(pass, r.Tok, r.Value)
    }
    
    func checkCopyLocksRangeVar(pass *analysis.Pass, rtok token.Token, e ast.Expr) {
    	if e == nil {
    		return
    	}
    	id, isId := e.(*ast.Ident)
    	if isId && id.Name == "_" {
    		return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 9.9K bytes
    - Viewed (0)
Back to top