mirror of
https://github.com/jsiebens/ionscale.git
synced 2026-03-31 15:07:49 +01:00
feat: use env variable for setting a default tailnet id when using a system admin key
This commit is contained in:
@@ -25,6 +25,18 @@ func GetString(key, defaultValue string) string {
|
||||
return defaultValue
|
||||
}
|
||||
|
||||
func GetUint64(key string, defaultValue uint64) uint64 {
|
||||
v := os.Getenv(key)
|
||||
if v != "" {
|
||||
vi, err := strconv.ParseUint(v, 10, 64)
|
||||
if err != nil {
|
||||
return defaultValue
|
||||
}
|
||||
return vi
|
||||
}
|
||||
return defaultValue
|
||||
}
|
||||
|
||||
func validatePublicAddr(addr string) (*url.URL, string, int, error) {
|
||||
scheme := "https"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user