Skip to content

Commit

Permalink
fix: excel output
Browse files Browse the repository at this point in the history
  • Loading branch information
redraskal committed Mar 4, 2024
1 parent 2da076d commit fa772e3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,12 @@ func setup() {
log.Fatal().Msg("Specify a valid match replay file/folder path (*.rec files)")
} else if extra > 0 {
viper.Set("input", pflag.Args()[0])
if strings.HasSuffix(pflag.Args()[0], ".xlsx") {
}
if !viper.IsSet("format") {
output := viper.GetString("output")
if strings.HasSuffix(output, ".xlsx") {
viper.Set("format", "excel")
} else if strings.HasSuffix(pflag.Args()[0], ".json") {
} else if strings.HasSuffix(output, ".json") {
viper.Set("format", "json")
}
}
Expand Down

0 comments on commit fa772e3

Please sign in to comment.