diff options
| author | Paul Buetow <pbuetow@mimecast.com> | 2022-02-04 21:37:29 +0000 |
|---|---|---|
| committer | Paul Buetow <pbuetow@mimecast.com> | 2022-02-04 21:37:29 +0000 |
| commit | 20bd2a6330b2a5da3dc42c92e4c4e634c78561ff (patch) | |
| tree | cab22128af9e54131facd0062a474459383a1c90 /internal/config/read.go | |
| parent | 8c714057a07ab494689c9e262d95519e34c204e1 (diff) | |
| parent | 1e205898c1270915b192db51acfdfc6e1a92e3e3 (diff) | |
merge 4.0.0-RC
Diffstat (limited to 'internal/config/read.go')
| -rw-r--r-- | internal/config/read.go | 37 |
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 - } -} |
