Skip to content

Commit

Permalink
Fix overwrite options
Browse files Browse the repository at this point in the history
  • Loading branch information
tkuchiki committed Oct 30, 2015
1 parent a43a2b1 commit de49ba2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit de49ba2

Please sign in to comment.