diff options
author | Christian Pointner <equinox@helsinki.at> | 2015-12-14 14:48:37 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2015-12-14 14:48:37 (GMT) |
commit | 97b905e99b95b6611d8d87bda90b56e47f2a5040 (patch) | |
tree | 0ec9f5c2b6c70b156e867ee770c31c42074a936c /src/helsinki.at/rhimport/conf.go | |
parent | 775a762b0c3d67d2ea19f288bec8c2ce857ec198 (diff) |
fixed bug where some context values where not initialiized properly
Diffstat (limited to 'src/helsinki.at/rhimport/conf.go')
-rw-r--r-- | src/helsinki.at/rhimport/conf.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/helsinki.at/rhimport/conf.go b/src/helsinki.at/rhimport/conf.go index 7288a89..2386ba9 100644 --- a/src/helsinki.at/rhimport/conf.go +++ b/src/helsinki.at/rhimport/conf.go @@ -28,6 +28,13 @@ import ( "github.com/vaughan0/go-ini" ) +type ImportParamDefaults struct { + Channels uint + NormalizationLevel int + AutotrimLevel int + UseMetaData bool +} + type Config struct { configfile string RDXportEndpoint string @@ -36,6 +43,7 @@ type Config struct { db_user string db_passwd string db_db string + ImportParamDefaults } func get_ini_value(file ini.File, section string, key string, dflt string) string { @@ -67,5 +75,9 @@ func NewConfig(configfile, rdxport_endpoint, temp_dir *string) (conf *Config, er } conf.RDXportEndpoint = *rdxport_endpoint conf.TempDir = *temp_dir + conf.ImportParamDefaults.Channels = 2 + conf.ImportParamDefaults.NormalizationLevel = -12 + conf.ImportParamDefaults.AutotrimLevel = 0 + conf.ImportParamDefaults.UseMetaData = true return } |