From 9e1ec4438c0608f5b9ac3c9dc8462cafe60f6a11 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Wed, 20 Jan 2021 16:25:49 +0800 Subject: [PATCH] climc: costreports: fix bad struct tag panic: Invalid structTag: help:"period of cost report send, example:"month/week/day" json:"period_type" Fixes b803de0705 ("add cost report module") --- pkg/mcclient/options/meter/costreports.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/mcclient/options/meter/costreports.go b/pkg/mcclient/options/meter/costreports.go index e0d4c98916..c4f4c24e22 100644 --- a/pkg/mcclient/options/meter/costreports.go +++ b/pkg/mcclient/options/meter/costreports.go @@ -17,9 +17,9 @@ func (opt *CostReportListOptions) Params() (jsonutils.JSONObject, error) { type CostReportCreateOptions struct { Scope string `help:"scope of cost report" json:"scope"` - PeriodType string `help:"period of cost report send, example:"month/week/day" json:"period_type"` + PeriodType string `help:"period of cost report send, e.g. month, week, day" json:"period_type"` Day int `help:"day of cost report send" json:"day"` - ColonTimer string `help:"hour and minute of cost report send, example:"HH:mm" json:"colon_timer"` + ColonTimer string `help:"hour and minute of cost report send, e.g. HH:mm" json:"colon_timer"` Emails []string `help:"emails of cost report send" json:"emails"` StartRun bool `help:"whether cost report sends instantly" json:"start_run"` } @@ -31,9 +31,9 @@ func (opt *CostReportCreateOptions) Params() (jsonutils.JSONObject, error) { type CostReportUpdateOptions struct { ID string `help:"ID of cost report" json:"-"` - PeriodType string `help:"period of cost report send, example:"month/week/day" json:"period_type"` + PeriodType string `help:"period of cost report send, e.g. month, week, day" json:"period_type"` Day int `help:"day of cost report send" json:"day"` - ColonTimer string `help:"hour and minute of cost report send, example:"HH:mm" json:"colon_timer"` + ColonTimer string `help:"hour and minute of cost report send, e.g. HH:mm" json:"colon_timer"` Emails []string `help:"emails of cost report send" json:"emails"` StartRun bool `help:"whether cost report sends instantly" json:"start_run"` }