routecases

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package routecases holds the request paths that pin manifest.MatchRoute to the pages handler: the tests of web check what the handler serves at each path, and the tests of manifest check that MatchRoute names the same page.

Index

Constants

This section is empty.

Variables

View Source
var Cases = []Case{
	{Folders: notes, Keys: notesKeys, Path: "/notes", Want: "/notes"},
	{Folders: notes, Keys: notesKeys, Path: "/notes/12", Want: "/notes/{id}"},
	{Folders: notes, Keys: notesKeys, Path: "/notes/%31%32", Want: "/notes/{id}"},
	{Folders: notes, Keys: notesKeys, Path: "/notes/12/", Want: "/notes/{id}"},
	{Folders: notes, Keys: notesKeys, Path: "/notes/abc"},
	{Folders: notes, Keys: notesKeys, Path: "/notes/n_5"},
	{Folders: notes, Keys: notesKeys, Path: "/notes/1%2F2"},
	{Folders: notes, Keys: notesKeys, Path: "/notes//12"},
	{Folders: notes, Keys: notesKeys, Path: "/notes/12/x"},
	{Folders: tags, Keys: tagsKeys, Path: "/t/s_y", Want: "/t/{x}"},
	{Folders: tags, Keys: tagsKeys, Path: "/t/s_x", Want: "/t/{x}"},
	{Folders: tags, Keys: tagsKeys, Path: "/t/n_5", Want: "/t/{x}"},
	{Folders: tags, Keys: tagsKeys, Path: "/t/x%2Fy"},
	{Folders: tags, Keys: tagsKeys, Path: "/t"},
	{Folders: ab, Keys: ab, Path: "/a/b", Want: "/a/b"},
	{Folders: ab, Keys: ab, Path: "/a/b/", Want: "/a/b"},
	{Folders: ab, Keys: ab, Path: "//a/b//", Want: "/a/b"},
	{Folders: ab, Keys: ab, Path: "/a%2Fb", Want: "/a/b"},
	{Folders: ab, Keys: ab, Path: "/a//b"},
	{Folders: ab, Keys: ab, Path: "/A/b"},
	{Folders: ab, Keys: ab, Path: "/a"},
	{Folders: ab, Keys: ab, Path: "/"},
	{Folders: users, Keys: usersKeys, Path: "/u/new", Want: "/u/new"},
	{Folders: users, Keys: usersKeys, Path: "/u/bob", Want: "/u/{name}"},
	{Folders: branch, Keys: branchKeys, Path: "/v/z/d", Want: "/v/{x}/d"},
	{Folders: branch, Keys: branchKeys, Path: "/v/w/d"},
	{Folders: []string{"/l", "/l/p"}, Keys: []string{"/l/p"}, Path: "/l"},
	{Folders: []string{"/l", "/l/p"}, Keys: []string{"/l/p"}, Path: "/l/p", Want: "/l/p"},
	{Folders: []string{"/m", "/m/n_id"}, Keys: []string{"/m/{id}"}, Path: "/m"},
	{Folders: []string{"/m", "/m/n_id"}, Keys: []string{"/m/{id}"}, Path: "/m/7", Want: "/m/{id}"},
	{Folders: []string{"/"}, Keys: []string{"/"}, Path: "/", Want: "/"},
	{Folders: []string{"/", "/a"}, Keys: []string{"/", "/a"}, Path: "/a", Want: "/a"},
	{Folders: []string{"/"}, Keys: []string{"/"}, Path: "/x"},
}

Cases are the paths every matcher of access keys must agree on with the pages handler.

Functions

This section is empty.

Types

type Case

type Case struct {
	Folders []string
	Keys    []string
	Path    string
	Want    string
}

Case is one app and one request path. Folders are the app's page folders, such as /notes/n_id; Keys the access keys aicoded generate writes for them, such as /notes/{id}, where a folder without a key is a layout whose default page is its first page folder right below it that is not a parameter folder; Path the request target; and Want the key of the page the pages handler serves at Path, or "" when it answers 404 or a redirect.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL