Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for isExampleSuffix (0.21 sec)

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

    	}
    
    	if ident == "" {
    		// Check Example_suffix and Example_BadSuffix.
    		if residual := strings.TrimPrefix(exName, "_"); !isExampleSuffix(residual) {
    			pass.Reportf(fn.Pos(), "%s has malformed example suffix: %s", fnName, residual)
    		}
    		return
    	}
    
    	mmbr := elems[1]
    	if !isExampleSuffix(mmbr) {
    		// Check ExampleFoo_Method and ExampleFoo_BadMethod.
    		found := false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  2. src/go/doc/example.go

    	if i == len(s) {
    		return s, "", true
    	}
    	if i == len(s)-1 {
    		return "", "", false
    	}
    	prefix, suffix = s[:i], s[i+1:]
    	return prefix, suffix, isExampleSuffix(suffix)
    }
    
    func isExampleSuffix(s string) bool {
    	r, size := utf8.DecodeRuneInString(s)
    	return size > 0 && unicode.IsLower(r)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 21.4K bytes
    - Viewed (0)
Back to top