summaryrefslogtreecommitdiff
path: root/pkg/app/app.go
diff options
context:
space:
mode:
authorIbrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>2018-12-09 00:10:32 +0300
committerIbrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>2018-12-09 00:10:32 +0300
commitaa6f0cf9a44f502fe41aecf9ed3f5ddbb8e20a71 (patch)
treed29e0dd7c754ff663c325202494a51d7ee034043 /pkg/app/app.go
parentgit add, git reset and git stash implementation added. (diff)
downloadgitbatch-aa6f0cf9a44f502fe41aecf9ed3f5ddbb8e20a71.tar.gz
added sync to remote branches with git fetch prune
Diffstat (limited to 'pkg/app/app.go')
-rw-r--r--pkg/app/app.go4
1 files changed, 3 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)