Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for trimLeadingSlash (0.15 sec)

  1. cmd/utils.go

    // empty inputs, instead returns "empty" as is.
    func pathClean(p string) string {
    	cp := path.Clean(p)
    	if cp == "." {
    		return ""
    	}
    	return cp
    }
    
    func trimLeadingSlash(ep string) string {
    	if len(ep) > 0 && ep[0] == '/' {
    		// Path ends with '/' preserve it
    		if ep[len(ep)-1] == '/' && len(ep) > 1 {
    			ep = path.Clean(ep)
    			ep += slashSeparator
    		} else {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 15:18:21 GMT 2024
    - 31.4K bytes
    - Viewed (0)
Back to top