12 lines
242 B
Go
12 lines
242 B
Go
|
package envs
|
||
|
|
||
|
import (
|
||
|
`regexp`
|
||
|
)
|
||
|
|
||
|
// Compiled regex patterns.
|
||
|
var (
|
||
|
reMaybeInt *regexp.Regexp = regexp.MustCompilePOSIX(`^(?P<sign>\+|-)[0-9]+$`)
|
||
|
reMaybeFloat *regexp.Regexp = regexp.MustCompilePOSIX(`(?P<sign>\+|-)?[0-9]+\.[0-9]+$`)
|
||
|
)
|