diff options
author | 2021-03-04 12:07:24 +0100 | |
---|---|---|
committer | 2021-03-04 12:07:24 +0100 | |
commit | 645ea31856eb578882791b116481385bf10da6e8 (patch) | |
tree | ca866b976da8ec4021f7af4e4a3f46581a11053d /internal/consts/consts.go | |
parent | further yak shaving (diff) | |
download | gotosocial-645ea31856eb578882791b116481385bf10da6e8.tar.xz |
Move some consts around
Diffstat (limited to 'internal/consts/consts.go')
-rw-r--r-- | internal/consts/consts.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/consts/consts.go b/internal/consts/consts.go index 92c574a41..3940c660f 100644 --- a/internal/consts/consts.go +++ b/internal/consts/consts.go @@ -20,6 +20,8 @@ // Don't judge me. package consts +import "regexp" + // FlagNames is used for storing the names of the various flags used for // initializing and storing urfavecli flag variables. type FlagNames struct { @@ -75,3 +77,6 @@ func GetEnvNames() FlagNames { DbDatabase: "GTS_DB_DATABASE", } } + +var IPV4Regex = regexp.MustCompile(`^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$`) +var HostnameRegex = regexp.MustCompile(`^(?:[a-z0-9]+(?:-[a-z0-9]+)*\.)+[a-z]{2,}$`) |