From 3b62c363dc71f63ab5fb8118fcd2c284b1683236 Mon Sep 17 00:00:00 2001 From: Antoine Pelisse Date: Fri, 20 Apr 2018 13:43:35 -0700 Subject: [PATCH] Embbed more example types for docs --- pkg/gen/apis/example_test.go | 48 ++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/pkg/gen/apis/example_test.go b/pkg/gen/apis/example_test.go index 1a5b7a4ed7..de2b899b14 100644 --- a/pkg/gen/apis/example_test.go +++ b/pkg/gen/apis/example_test.go @@ -20,28 +20,28 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -func Example() {} - -// FooSpec defines the desired state of Foo -type FooSpec struct { - // +kubebuilder:validation:Maximum=10 - // +kubebuilder:validation:ExclusiveMinimum=3 - Count int `json:"count"` -} - -// FooStatus defines the observed state of Foo -type FooStatus struct{} - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Foo -// +k8s:openapi-gen=true -// +kubebuilder:resource:path=foos -type Foo struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec FooSpec `json:"spec,omitempty"` - Status FooStatus `json:"status,omitempty"` +func Example() { + // FooSpec defines the desired state of Foo + type FooSpec struct { + // +kubebuilder:validation:Maximum=10 + // +kubebuilder:validation:ExclusiveMinimum=3 + Count int `json:"count"` + } + + // FooStatus defines the observed state of Foo + type FooStatus struct{} + + // +genclient + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + + // Foo + // +k8s:openapi-gen=true + // +kubebuilder:resource:path=foos + type Foo struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec FooSpec `json:"spec,omitempty"` + Status FooStatus `json:"status,omitempty"` + } }