From 3954db9b99e2363ac8864adc18bfbc87ae900559 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Sat, 1 Mar 2025 21:48:34 +0800 Subject: [PATCH] fix default value not set (#80) --- cmd/user_data.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/user_data.go b/cmd/user_data.go index fea74032..d2fd5402 100644 --- a/cmd/user_data.go +++ b/cmd/user_data.go @@ -792,7 +792,11 @@ func exportUserTransaction(c *core.CliContext) error { filePath := c.String("file") fileType := c.String("type") - if fileType != "" && fileType != "csv" && fileType != "tsv" { + if fileType == "" { + fileType = "csv" + } + + if fileType != "csv" && fileType != "tsv" { log.CliErrorf(c, "[user_data.exportUserTransaction] export file type is not supported") return errs.ErrNotSupported }