aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2024-05-17 07:20:23 -0500
committerXe Iaso <me@xeiaso.net>2024-05-17 07:28:19 -0500
commit7ce28bfc8ac4f306196bacbc4ff06671e8a58654 (patch)
treeac0b266643e83333257e9bf5c04df6e425b0445d /internal
parentf22aa000db6e91f0fb59f4728bdbda0aa40f475d (diff)
downloadx-7ce28bfc8ac4f306196bacbc4ff06671e8a58654.tar.xz
x-7ce28bfc8ac4f306196bacbc4ff06671e8a58654.zip
internal: add package flagfolder to populate FlagSets with a secret mount
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'internal')
-rw-r--r--internal/internal.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/internal.go b/internal/internal.go
index b9c1962..671360f 100644
--- a/internal/internal.go
+++ b/internal/internal.go
@@ -10,6 +10,7 @@ import (
"github.com/posener/complete"
"go4.org/legal"
+ "within.website/x/flagfolder"
"within.website/x/internal/confyg/flagconfyg"
"within.website/x/internal/flagenv"
"within.website/x/internal/manpage"
@@ -48,14 +49,16 @@ func configFileLocation() string {
//
// - command line flags (to get -config)
// - environment variables
+// - any secrets mounted to /run/secrets
// - configuration file (if -config is set)
// - command line flags
//
// This is done this way to ensure that command line flags always are the deciding
-// factor as an escape hatch.
+// factor as an escape hatch, at the cost of potentially evaluating flags twice.
func HandleStartup() {
flag.Parse()
flagenv.Parse()
+ flagfolder.Parse()
ctx := context.Background()