mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 02:44:59 +00:00
simplify regexes by using backquoted strings to avoid double escapes
This commit is contained in:
parent
c543831937
commit
8ae170ac6c
1 changed files with 2 additions and 2 deletions
4
uri.go
4
uri.go
|
|
@ -26,8 +26,8 @@ import (
|
|||
)
|
||||
|
||||
var schemeRegexp = regexp.MustCompile("^[+a-z]+$")
|
||||
var hostRegexp = regexp.MustCompile("^[0-9a-z.-]+$|^\\[[:0-9a-fA-F]+\\]$")
|
||||
var addressRegexp = regexp.MustCompile("^(([+a-z]+):\\/\\/)?([0-9a-z.-]+|\\[[:0-9a-fA-F]+\\])?(:([0-9]+))?$")
|
||||
var hostRegexp = regexp.MustCompile(`^[0-9a-z.-]+$|^\[[:0-9a-fA-F]+\]$`)
|
||||
var addressRegexp = regexp.MustCompile(`^(([+a-z]+):\/\/)?([0-9a-z.-]+|\[[:0-9a-fA-F]+\])?(:([0-9]+))?$`)
|
||||
|
||||
// URI represents a Pilosa URI.
|
||||
// A Pilosa URI consists of three parts:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue