diff --git a/config.go b/config.go index f9a00e4..b653bd4 100644 --- a/config.go +++ b/config.go @@ -46,27 +46,27 @@ func SetConfig(config Config, arg Config) Config { config.Tsv = arg.Tsv } - if config.ApptimeLabel == "" { + if config.ApptimeLabel == "" || (config.ApptimeLabel != "" && arg.ApptimeLabel != ApptimeLabel) { config.ApptimeLabel = arg.ApptimeLabel } - if config.SizeLabel == "" { + if config.SizeLabel == "" || (config.SizeLabel != "" && arg.SizeLabel != SizeLabel) { config.SizeLabel = arg.SizeLabel } - if config.MethodLabel == "" { + if config.MethodLabel == "" || (config.MethodLabel != "" && arg.MethodLabel != MethodLabel) { config.MethodLabel = arg.MethodLabel } - if config.UriLabel == "" { + if config.UriLabel == "" || (config.UriLabel != "" && arg.UriLabel != UriLabel) { config.UriLabel = arg.UriLabel } - if config.TimeLabel == "" { + if config.TimeLabel == "" || (config.TimeLabel != "" && arg.TimeLabel != TimeLabel) { config.TimeLabel = arg.TimeLabel } - if config.Limit == 0 { + if config.Limit == 0 || (config.Limit != 0 && arg.Limit != Limit) { config.Limit = arg.Limit } diff --git a/main.go b/main.go index adaeb03..620c008 100644 --- a/main.go +++ b/main.go @@ -291,7 +291,7 @@ var ( func main() { kingpin.CommandLine.Help = "Access Log Profiler for LTSV (read from file or stdin)." - kingpin.Version("0.1.0") + kingpin.Version("0.1.1") kingpin.Parse() var f *os.File