Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ParseTilePath (0.13 sec)

  1. src/cmd/vendor/golang.org/x/mod/sumdb/tlog/tile.go

    	}
    	var L string
    	if t.L == -1 {
    		L = "data"
    	} else {
    		L = fmt.Sprintf("%d", t.L)
    	}
    	return fmt.Sprintf("tile/%d/%s/%s%s", t.H, L, nStr, pStr)
    }
    
    // ParseTilePath parses a tile coordinate path.
    func ParseTilePath(path string) (Tile, error) {
    	f := strings.Split(path, "/")
    	if len(f) < 4 || f[0] != "tile" {
    		return Tile{}, &badPathError{path}
    	}
    	h, err1 := strconv.Atoi(f[1])
    	isData := false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 13K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/mod/sumdb/server.go

    			return
    		}
    		w.Header().Set("Content-Type", "text/plain; charset=UTF-8")
    		w.Write(data)
    
    	case strings.HasPrefix(r.URL.Path, "/tile/"):
    		t, err := tlog.ParseTilePath(r.URL.Path[1:])
    		if err != nil {
    			http.Error(w, "invalid tile syntax", http.StatusBadRequest)
    			return
    		}
    		if t.L == -1 {
    			// Record data.
    			start := t.N << uint(t.H)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 12 20:38:21 UTC 2023
    - 4.9K bytes
    - Viewed (0)
Back to top