summaryrefslogtreecommitdiff
path: root/internal/config/read.go
diff options
context:
space:
mode:
authorPaul Buetow <pbuetow@mimecast.com>2021-10-21 21:28:49 +0300
committerPaul Buetow <pbuetow@mimecast.com>2021-10-21 21:28:49 +0300
commitf4207a55f71bfbcfdc532d5cdd3befaa3474a157 (patch)
treeea5e4a2d2a67035f645bdee496ae55a52034178a /internal/config/read.go
parentd80d6070557e3a800e3a54967af9eced518f116b (diff)
parent739205206d63bf42f4e843b39d04d4c8cd8207c3 (diff)
merge develop
Diffstat (limited to 'internal/config/read.go')
-rw-r--r--internal/config/read.go37
1 files changed, 0 insertions, 37 deletions
diff --git a/internal/config/read.go b/internal/config/read.go
deleted file mode 100644
index a4e605b..0000000
--- a/internal/config/read.go
+++ /dev/null
@@ -1,37 +0,0 @@
-package config
-
-import (
- "os"
-)
-
-// Read the DTail configuration.
-func Read(configFile string, sshPort int) {
- initializer := configInitializer{
- Common: newDefaultCommonConfig(),
- Server: newDefaultServerConfig(),
- Client: newDefaultClientConfig(),
- }
-
- if configFile == "" {
- configFile = "./cfg/dtail.json"
- }
-
- if _, err := os.Stat(configFile); !os.IsNotExist(err) {
- initializer.parseConfig(configFile)
- }
-
- // Assign pointers to global variables, so that we can access the
- // configuration from any place of the program.
- Common = initializer.Common
- Server = initializer.Server
- Client = initializer.Client
-
- if Server.MapreduceLogFormat == "" {
- Server.MapreduceLogFormat = "default"
- }
-
- // If non-standard port specified, overwrite config
- if sshPort != 2222 {
- Common.SSHPort = sshPort
- }
-}