Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

output/csv: Revert the JSON names of the config #3395

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions output/csv/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ import (

// Config is the config for the csv output
type Config struct {
FileName null.String `json:"fileName" envconfig:"K6_CSV_FILENAME"`
SaveInterval types.NullDuration `json:"saveInterval" envconfig:"K6_CSV_SAVE_INTERVAL"`
TimeFormat null.String `json:"timeFormat" envconfig:"K6_CSV_TIME_FORMAT"`
// Samples.
FileName null.String `json:"file_name" envconfig:"K6_CSV_FILENAME"`
SaveInterval types.NullDuration `json:"save_interval" envconfig:"K6_CSV_SAVE_INTERVAL"`
TimeFormat null.String `json:"time_format" envconfig:"K6_CSV_TIME_FORMAT"`
}

// TimeFormat custom enum type
Expand Down Expand Up @@ -83,7 +84,6 @@ func ParseArg(arg string, logger logrus.FieldLogger) (Config, error) {
c.FileName = null.StringFrom(r[1])
case "timeFormat":
c.TimeFormat = null.StringFrom(r[1])

default:
return c, fmt.Errorf("unknown key %q as argument for csv output", r[0])
}
Expand Down