From 5a30da3fbdab17ecbcacb09b38d4cd9faf9e3044 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Fri, 24 Jul 2020 15:28:02 +0100 Subject: starting to add new code --- pkg/datamaps/config.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pkg/datamaps') diff --git a/pkg/datamaps/config.go b/pkg/datamaps/config.go index 713ad5a..687166c 100644 --- a/pkg/datamaps/config.go +++ b/pkg/datamaps/config.go @@ -11,6 +11,15 @@ const ( dbName = "datamaps.db" ) +// DetectConfig looks for the configuration directory and +// files, and the database file needed to run the application. +func DetectConfig() bool { + dir, err := os.UserConfigDir() + if err != nil { + return "", err + } +} + // SetUp creates the config directory and requisite files func SetUp() (string, error) { dir, err := os.UserConfigDir() -- cgit v1.2.3