From 7d0870790a12f7b2a874437fc833b95437a5cd5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=88=E8=BD=A9?= Date: Mon, 15 Jun 2026 11:04:17 +0800 Subject: [PATCH] fix(region): struct tag fix (#25023) --- cmd/climc/shell/k8s/container_registry.go | 2 +- pkg/apis/compute/guests.go | 2 +- pkg/apis/compute/vpcs_const.go | 2 +- pkg/apis/image/image.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/climc/shell/k8s/container_registry.go b/cmd/climc/shell/k8s/container_registry.go index f59a8e8f0c..ec676202d4 100644 --- a/cmd/climc/shell/k8s/container_registry.go +++ b/cmd/climc/shell/k8s/container_registry.go @@ -43,7 +43,7 @@ func initContainerRegistry() { type UploadOptions struct { REGISTRY string `help:"The name or id of registry" json:"-"` FILE string `help:"The container tar image" json:"-"` - Name string `help:"Override image name" json:"name` + Name string `help:"Override image name" json:"name"` Tag string `help:"Override image tag" json:"tag"` } R(new(UploadOptions), "k8s-container-registry-upload-image", "Upload a docker image", func(s *mcclient.ClientSession, args *UploadOptions) error { diff --git a/pkg/apis/compute/guests.go b/pkg/apis/compute/guests.go index 832e85e236..43fa2b43f9 100644 --- a/pkg/apis/compute/guests.go +++ b/pkg/apis/compute/guests.go @@ -406,7 +406,7 @@ type GuestDiskInfo struct { Throughput int `json:"throughput"` Bps int `json:"bps"` ImageId string `json:"image_id,omitempty"` - Image string `json:"image,omitemtpy"` + Image string `json:"image,omitempty"` StorageId string `json:"storage_id"` Preallocation string `json:"preallocation"` } diff --git a/pkg/apis/compute/vpcs_const.go b/pkg/apis/compute/vpcs_const.go index 78928f1b01..07708fd1c3 100644 --- a/pkg/apis/compute/vpcs_const.go +++ b/pkg/apis/compute/vpcs_const.go @@ -91,7 +91,7 @@ type VpcListInput struct { OrderByNetworkCount string `json:"order_by_network_count"` // 按二层网络数量排序 // pattern:asc|desc - OrderByWireCount string `json:""order_by_wire_count` + OrderByWireCount string `json:"order_by_wire_count"` } const ( diff --git a/pkg/apis/image/image.go b/pkg/apis/image/image.go index 20a8927b01..9b8dcd944c 100644 --- a/pkg/apis/image/image.go +++ b/pkg/apis/image/image.go @@ -57,7 +57,7 @@ type ImageListInput struct { // 发行版本,可能值为: CentOS, Ubuntu, Debian, ArchLinux, OpenEuler 等 Distributions []string `json:"distributions"` // 发行版精确匹配 - DistributionPreciseMatch bool `json:"distribution_precise_match` + DistributionPreciseMatch bool `json:"distribution_precise_match"` } type GuestImageListInput struct {