package uritemplate
Import Path
github.com/yosida95/uritemplate/v3 (on go.dev)
Dependency Relation
imports 9 packages, and imported by one package
Involved Source Files
compile.go
equals.go
error.go
escape.go
expression.go
machine.go
match.go
parse.go
prog.go
uritemplate.go
value.go
Package-Level Type Names (total 5)
func Equals(t1 *Template, t2 *Template, flags CompareFlags) bool
const CompareVarname
Template represents a URI Template.
Expand returns a URI reference corresponding to the template expanded using the passed variables.
(*Template) Match(expansion string) Values
Raw returns a raw URI template passed to New in string.
Regexp converts the template to regexp and returns compiled *regexp.Regexp.
Varnames returns variable names used in the template.
func MustNew(template string) *Template
func New(template string) (*Template, error)
func Equals(t1 *Template, t2 *Template, flags CompareFlags) bool
func Equals(t1 *Template, t2 *Template, flags CompareFlags) bool
T ValueType
V []string
( Value) KV() []string
( Value) List() []string
( Value) String() string
( Value) Valid() bool
Value : expvar.Var
Value : fmt.Stringer
func KV(kv ...string) Value
func List(v ...string) Value
func String(v string) Value
func Values.Get(name string) Value
func Values.Set(name string, value Value)
A varname containing pct-encoded characters is not the same variable as
a varname with those same characters decoded.
-- https://tools.ietf.org/html/rfc6570#section-2.3
( Values) Get(name string) Value
( Values) Set(name string, value Value)
func (*Template).Match(expansion string) Values
func (*Template).Expand(vars Values) (string, error)
Package-Level Functions (total 6)
Equals reports whether or not two URI Templates t1 and t2 are equivalent.
KV returns Value that represents associative list.
KV panics if len(kv) is not even.
List returns Value that represents list.
MustNew panics if the template cannot be recognized.
New parses and constructs a new Template instance based on the template.
New returns an error if the template cannot be recognized.
String returns Value that represents string.
Package-Level Constants (total 4)
const CompareVarname CompareFlags = 1 const ValueTypeKV = 2 const ValueTypeList = 1 const ValueTypeString = 0
![]() |
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |