From bccafcb97b6b12dd3cc228e8702ee35b7767b4a4 Mon Sep 17 00:00:00 2001 From: Masahiro Sano Date: Thu, 14 May 2015 22:29:11 +0900 Subject: [PATCH] fix struct field tag --- pkg/api/types.go | 2 +- pkg/api/v1/types.go | 10 +++++----- pkg/api/v1beta1/types.go | 4 ++-- pkg/api/v1beta2/types.go | 4 ++-- pkg/api/v1beta3/types.go | 10 +++++----- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/pkg/api/types.go b/pkg/api/types.go index 569b24f03f2..19d11062cf5 100644 --- a/pkg/api/types.go +++ b/pkg/api/types.go @@ -702,7 +702,7 @@ type ContainerState struct { type ContainerStatus struct { // Each container in a pod must have a unique name. - Name string `name of the container; must be a DNS_LABEL and unique within the pod; cannot be updated"` + Name string `json:"name"` // TODO(dchen1107): Should we rename PodStatus to a more generic name or have a separate states // defined for container? State ContainerState `json:"state,omitempty"` diff --git a/pkg/api/v1/types.go b/pkg/api/v1/types.go index 52a74c04be0..190ed97e9a3 100644 --- a/pkg/api/v1/types.go +++ b/pkg/api/v1/types.go @@ -282,7 +282,7 @@ type PersistentVolumeStatus struct { type PersistentVolumeList struct { TypeMeta `json:",inline"` - ListMeta `json:"metadata,omitempty" description:"standard list metadata; see http://docs.k8s.io/api-conventions.md#types-kinds` + ListMeta `json:"metadata,omitempty" description:"standard list metadata; see http://docs.k8s.io/api-conventions.md#types-kinds"` Items []PersistentVolume `json:"items,omitempty" description:"list of persistent volumes"` } @@ -292,7 +292,7 @@ type PersistentVolumeClaim struct { ObjectMeta `json:"metadata,omitempty" description:"standard object metadata; see http://docs.k8s.io/api-conventions.md#metadata"` // Spec defines the volume requested by a pod author - Spec PersistentVolumeClaimSpec `json:"spec,omitempty" description: "the desired characteristics of a volume"` + Spec PersistentVolumeClaimSpec `json:"spec,omitempty" description:"the desired characteristics of a volume"` // Status represents the current information about a claim Status PersistentVolumeClaimStatus `json:"status,omitempty" description:"the current status of a persistent volume claim; read-only"` @@ -300,8 +300,8 @@ type PersistentVolumeClaim struct { type PersistentVolumeClaimList struct { TypeMeta `json:",inline"` - ListMeta `json:"metadata,omitempty" description:"standard list metadata; see http://docs.k8s.io/api-conventions.md#types-kinds` - Items []PersistentVolumeClaim `json:"items,omitempty" description: "a list of persistent volume claims"` + ListMeta `json:"metadata,omitempty" description:"standard list metadata; see http://docs.k8s.io/api-conventions.md#types-kinds"` + Items []PersistentVolumeClaim `json:"items,omitempty" description:"a list of persistent volume claims"` } // PersistentVolumeClaimSpec describes the common attributes of storage devices @@ -873,7 +873,7 @@ type Pod struct { // PodList is a list of Pods. type PodList struct { TypeMeta `json:",inline"` - ListMeta `json:"metadata,omitempty" description:"standard list metadata; see http://docs.k8s.io/api-conventions.md#types-kinds` + ListMeta `json:"metadata,omitempty" description:"standard list metadata; see http://docs.k8s.io/api-conventions.md#types-kinds"` Items []Pod `json:"items" description:"list of pods"` } diff --git a/pkg/api/v1beta1/types.go b/pkg/api/v1beta1/types.go index aeae7121515..b210c355e2b 100644 --- a/pkg/api/v1beta1/types.go +++ b/pkg/api/v1beta1/types.go @@ -193,7 +193,7 @@ type PersistentVolumeClaim struct { TypeMeta `json:",inline"` // Spec defines the volume requested by a pod author - Spec PersistentVolumeClaimSpec `json:"spec,omitempty" description: "the desired characteristics of a volume"` + Spec PersistentVolumeClaimSpec `json:"spec,omitempty" description:"the desired characteristics of a volume"` // Status represents the current information about a claim Status PersistentVolumeClaimStatus `json:"status,omitempty" description:"the current status of a persistent volume claim; read-only"` @@ -201,7 +201,7 @@ type PersistentVolumeClaim struct { type PersistentVolumeClaimList struct { TypeMeta `json:",inline"` - Items []PersistentVolumeClaim `json:"items,omitempty" description: "a list of persistent volume claims"` + Items []PersistentVolumeClaim `json:"items,omitempty" description:"a list of persistent volume claims"` } // PersistentVolumeClaimSpec describes the common attributes of storage devices diff --git a/pkg/api/v1beta2/types.go b/pkg/api/v1beta2/types.go index 474618f0b6b..331c99806ba 100644 --- a/pkg/api/v1beta2/types.go +++ b/pkg/api/v1beta2/types.go @@ -157,7 +157,7 @@ type PersistentVolumeClaim struct { TypeMeta `json:",inline"` // Spec defines the volume requested by a pod author - Spec PersistentVolumeClaimSpec `json:"spec,omitempty" description: "the desired characteristics of a volume"` + Spec PersistentVolumeClaimSpec `json:"spec,omitempty" description:"the desired characteristics of a volume"` // Status represents the current information about a claim Status PersistentVolumeClaimStatus `json:"status,omitempty" description:"the current status of a persistent volume claim; read-only"` @@ -165,7 +165,7 @@ type PersistentVolumeClaim struct { type PersistentVolumeClaimList struct { TypeMeta `json:",inline"` - Items []PersistentVolumeClaim `json:"items,omitempty" description: "a list of persistent volume claims"` + Items []PersistentVolumeClaim `json:"items,omitempty" description:"a list of persistent volume claims"` } // PersistentVolumeClaimSpec describes the common attributes of storage devices diff --git a/pkg/api/v1beta3/types.go b/pkg/api/v1beta3/types.go index d4e77963821..ade09e91f21 100644 --- a/pkg/api/v1beta3/types.go +++ b/pkg/api/v1beta3/types.go @@ -282,7 +282,7 @@ type PersistentVolumeStatus struct { type PersistentVolumeList struct { TypeMeta `json:",inline"` - ListMeta `json:"metadata,omitempty" description:"standard list metadata; see http://docs.k8s.io/api-conventions.md#types-kinds` + ListMeta `json:"metadata,omitempty" description:"standard list metadata; see http://docs.k8s.io/api-conventions.md#types-kinds"` Items []PersistentVolume `json:"items,omitempty" description:"list of persistent volumes"` } @@ -292,7 +292,7 @@ type PersistentVolumeClaim struct { ObjectMeta `json:"metadata,omitempty" description:"standard object metadata; see http://docs.k8s.io/api-conventions.md#metadata"` // Spec defines the volume requested by a pod author - Spec PersistentVolumeClaimSpec `json:"spec,omitempty" description: "the desired characteristics of a volume"` + Spec PersistentVolumeClaimSpec `json:"spec,omitempty" description:"the desired characteristics of a volume"` // Status represents the current information about a claim Status PersistentVolumeClaimStatus `json:"status,omitempty" description:"the current status of a persistent volume claim; read-only"` @@ -300,8 +300,8 @@ type PersistentVolumeClaim struct { type PersistentVolumeClaimList struct { TypeMeta `json:",inline"` - ListMeta `json:"metadata,omitempty" description:"standard list metadata; see http://docs.k8s.io/api-conventions.md#types-kinds` - Items []PersistentVolumeClaim `json:"items,omitempty" description: "a list of persistent volume claims"` + ListMeta `json:"metadata,omitempty" description:"standard list metadata; see http://docs.k8s.io/api-conventions.md#types-kinds"` + Items []PersistentVolumeClaim `json:"items,omitempty" description:"a list of persistent volume claims"` } // PersistentVolumeClaimSpec describes the common attributes of storage devices @@ -873,7 +873,7 @@ type Pod struct { // PodList is a list of Pods. type PodList struct { TypeMeta `json:",inline"` - ListMeta `json:"metadata,omitempty" description:"standard list metadata; see http://docs.k8s.io/api-conventions.md#types-kinds` + ListMeta `json:"metadata,omitempty" description:"standard list metadata; see http://docs.k8s.io/api-conventions.md#types-kinds"` Items []Pod `json:"items" description:"list of pods"` }