{"@context":"https://w3id.org/codemeta/3.0","@type":"SoftwareSourceCode","identifier":"pkg:golang/github.com/2lambda123/pat","name":"github.com/2lambda123/pat","description":"Package gorilla/pat is a request router and dispatcher with a pat-like\ninterface. It is an alternative to gorilla/mux that showcases how it can\nbe used as a base for different API flavors. Package pat is documented at:\n\nLet's start registering a couple of URL paths and handlers:\n\nHere we register three routes mapping URL paths to handlers. This is\nequivalent to how http.HandleFunc() works: if an incoming GET request matches\none of the paths, the corresponding handler is called passing\n(http.ResponseWriter, *http.Request) as parameters.\n\nNote: gorilla/pat matches path prefixes, so you must register the most\nspecific paths first.\n\nNote: differently from pat, these methods accept a handler function, and not an\nhttp.Handler. We think this is shorter and more convenient. To set an\nhttp.Handler, use the Add() method.\n\nPaths can have variables. They are defined using the format {name} or\n{name:pattern}. If a regular expression pattern is not defined, the matched\nvariable will be anything until the next slash. For example:\n\nThe names are used to create a map of route variables which are stored in the\nURL query, prefixed by a colon:\n\nAs in the gorilla/mux package, other matchers can be added to the registered\nroutes and URLs can be reversed as well. To build a URL for a route, first\nadd a name to it:\n\nThen you can get it using the name and generate a URL:\n\n...and the result will be a url.URL with the following path:\n\nCheck the mux documentation for more details about URL building and extra\nmatchers:","version":"v1.0.2","softwareVersion":"v1.0.2","license":"https://spdx.org/licenses/BSD-3-Clause","codeRepository":"https://github.com/2lambda123/pat","issueTracker":"https://github.com/2lambda123/pat/issues","url":"https://github.com/2lambda123/pat","programmingLanguage":{"@type":"ComputerLanguage","name":"Go"},"dateCreated":"2019-06-27","dateModified":"2023-11-05","datePublished":"2023-11-05","copyrightYear":2019,"downloadUrl":"https://proxy.golang.org/github.com/2lambda123/pat/@v/v1.0.2.zip","softwareHelp":{"@type":"WebSite","url":"https://pkg.go.dev/github.com/2lambda123/pat#section-documentation"},"applicationCategory":"go","runtimePlatform":"go","developmentStatus":"active","sameAs":["https://pkg.go.dev/github.com/2lambda123/pat"]}