mstorectl: replaced yaml tag to json
This commit is contained in:
@@ -35,8 +35,8 @@ type ExportFilesParams struct {
|
||||
}
|
||||
|
||||
type ExportFilesResult struct {
|
||||
Files []descr.File `yaml:"files,omitempty"`
|
||||
Filenames []string `yaml:"filenames,omitempty"`
|
||||
Files []descr.File `json:"files,omitempty"`
|
||||
Filenames []string `json:"filenames,omitempty"`
|
||||
}
|
||||
|
||||
func (util *FileUtil) ExportFiles(cmd *cobra.Command, args []string) {
|
||||
|
||||
@@ -177,9 +177,9 @@ type CommonFileParams struct {
|
||||
|
||||
func printResponse(res any, err error) {
|
||||
type Response struct {
|
||||
Error bool `json:"error" yaml:"error"`
|
||||
Message string `json:"message,omitempty" yaml:"message,omitempty"`
|
||||
Result any `json:"result,omitempty" yaml:"result,omitempty"`
|
||||
Error bool `json:"error" json:"error"`
|
||||
Message string `json:"message,omitempty" json:"message,omitempty"`
|
||||
Result any `json:"result,omitempty" json:"result,omitempty"`
|
||||
}
|
||||
resp := Response{}
|
||||
if err != nil {
|
||||
|
||||
@@ -25,9 +25,9 @@ type FileInfoParams struct {
|
||||
Filepath string
|
||||
}
|
||||
type FileInfoResult struct {
|
||||
File *descr.File `yaml:"file,omitempty"`
|
||||
Size int64 `yaml:"size,omitempty"`
|
||||
Digest string `yaml:"digest,omitempty"`
|
||||
File *descr.File `json:"file,omitempty"`
|
||||
Size int64 `json:"size,omitempty"`
|
||||
Digest string `json:"digest,omitempty"`
|
||||
}
|
||||
|
||||
func (util *FileUtil) FileInfo(cmd *cobra.Command, args []string) {
|
||||
|
||||
Reference in New Issue
Block a user