From 109b1d35b3a9d04e6b77dd553869a3248c5b5f72 Mon Sep 17 00:00:00 2001 From: Callan Bryant Date: Thu, 27 Feb 2020 22:31:44 +0000 Subject: [PATCH] make some consts default --- const.go | 11 +++++------ types.go | 1 + 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/const.go b/const.go index 3a687ad..fce7b31 100644 --- a/const.go +++ b/const.go @@ -1,11 +1,10 @@ package dsnet -// TODO allow env override (vars) as soon as someone needs it. Probably won't -// for ages, default interface name + locations are generally fine unless -// multiple VPNs are needed - const ( - INTERFACE_NAME = "dsnet" + // these end up in the config file + DEFAULT_INTERFACE_NAME = "dsnet" + DEFAULT_REPORT_FILE = "/var/lib/dsnet-report.json" + + // could be overridden in future via env CONFIG_FILE = "/etc/dsnet-config.json" - REPORT_FILE = "/var/lib/dsnet-report.json" ) diff --git a/types.go b/types.go index 0476fa8..e108568 100644 --- a/types.go +++ b/types.go @@ -54,6 +54,7 @@ type DsnetConfig struct { // IP network from which to allocate automatic sequential addresses //Network net.IPNet // TODO: use ParseCIDR to parse config + // Network is chosen randomly when not specified Network string `validate:"required,cidr"` // domain to append to hostnames. Relies on separate DNS server for // resolution. Informational only.