From 18e1b01008f7352ef493c48e0227c46c97a51e39 Mon Sep 17 00:00:00 2001 From: Ivan <2103732+codebien@users.noreply.github.com> Date: Fri, 13 Oct 2023 17:19:41 +0200 Subject: [PATCH] output/csv: Restored json config with snake_case fields This partially reverts commit e8886ac31d58c1f71862131b6ed28a08a6f20776. --- output/csv/config.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/output/csv/config.go b/output/csv/config.go index cc065cdc01d..a2c90db54ab 100644 --- a/output/csv/config.go +++ b/output/csv/config.go @@ -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 @@ -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]) }