Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for isDotSlash (0.16 sec)

  1. src/cmd/doc/main.go

    // of error is minute and even on Windows people will use ./
    // sometimes.
    var dotPaths = []string{
    	`./`,
    	`../`,
    	`.\`,
    	`..\`,
    }
    
    // isDotSlash reports whether the path begins with a reference
    // to the local . or .. directory.
    func isDotSlash(arg string) bool {
    	if arg == "." || arg == ".." {
    		return true
    	}
    	for _, dotPath := range dotPaths {
    		if strings.HasPrefix(arg, dotPath) {
    			return true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 12.2K bytes
    - Viewed (0)
Back to top