summaryrefslogtreecommitdiff
path: root/pkg/app
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/app')
-rw-r--r--pkg/app/app.go4
-rw-r--r--pkg/app/config.go16
2 files changed, 19 insertions, 1 deletions
diff --git a/pkg/app/app.go b/pkg/app/app.go
index d1ab15b..624b048 100644
--- a/pkg/app/app.go
+++ b/pkg/app/app.go
@@ -9,6 +9,7 @@ import (
// it has only the gui.Gui pointer for interface entity.
type App struct {
Gui *gui.Gui
+ Config *Config
}
// Setup will handle pre-required operations. It is designed to be a wrapper for
@@ -16,12 +17,13 @@ type App struct {
func Setup(directory, repoPattern, logLevel string) (*App, error) {
// initiate the app and give it initial values
app := &App{}
+ app.Config, _ = LoadConfiguration()
setLogLevel(logLevel)
var err error
directories := generateDirectories(directory, repoPattern)
// create a gui.Gui struct and set it as App's gui
- app.Gui, err = gui.NewGui(directories)
+ app.Gui, err = gui.NewGui(app.Config.Mode, directories)
if err != nil {
// the error types and handling is not considered yer
log.Error(err)
diff --git a/pkg/app/config.go b/pkg/app/config.go
new file mode 100644
index 0000000..d34e647
--- /dev/null
+++ b/pkg/app/config.go
@@ -0,0 +1,16 @@
+package app
+
+import (
+
+)
+
+type Config struct {
+ Mode string
+ Directories []string
+}
+
+func LoadConfiguration() (*Config, error) {
+ config := &Config{
+ }
+ return config, nil
+} \ No newline at end of file