From 6f0348fb69f6d04a0ac6ae2a767397ea33276a52 Mon Sep 17 00:00:00 2001 From: Grant Rodgers Date: Tue, 18 Sep 2018 12:47:18 -0700 Subject: [PATCH] Rename Targettable to Targetable (#73) --- apis/duck/v1alpha1/targettable_types.go | 28 ++++++++++----------- apis/duck/v1alpha1/zz_generated.deepcopy.go | 14 +++++------ 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/apis/duck/v1alpha1/targettable_types.go b/apis/duck/v1alpha1/targettable_types.go index 372d6a00a..99e97dcda 100644 --- a/apis/duck/v1alpha1/targettable_types.go +++ b/apis/duck/v1alpha1/targettable_types.go @@ -22,25 +22,25 @@ import ( "github.com/knative/pkg/apis/duck" ) -// Targettable is the schema for the targettable portion of the payload -type Targettable struct { +// Targetable is the schema for the targetable portion of the payload +type Targetable struct { // TODO(vaikas): Give me a schema! Field string `json:"field,omitempty"` } -// Implementations can verify that they implement Targettable via: -var _ = duck.VerifyType(&Target{}, &Targettable{}) +// Implementations can verify that they implement Targetable via: +var _ = duck.VerifyType(&Target{}, &Targetable{}) -// Targettable is an Implementable "duck type". -var _ duck.Implementable = (*Targettable)(nil) +// Targetable is an Implementable "duck type". +var _ duck.Implementable = (*Targetable)(nil) // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// Target is a skeleton type wrapping Targettable in the manner we expect +// Target is a skeleton type wrapping Targetable in the manner we expect // resource writers defining compatible resources to embed it. We will -// typically use this type to deserialize Targettable ObjectReferences and -// access the Targettable data. This is not a real resource. +// typically use this type to deserialize Targetable ObjectReferences and +// access the Targetable data. This is not a real resource. type Target struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -48,23 +48,23 @@ type Target struct { Status TargetStatus `json:"status"` } -// TargetStatus shows how we expect folks to embed Targettable in +// TargetStatus shows how we expect folks to embed Targetable in // their Status field. type TargetStatus struct { - Targettable *Targettable `json:"targettable,omitempty"` + Targetable *Targetable `json:"targetable,omitempty"` } -// In order for Targettable to be Implementable, Target must be Populatable. +// In order for Targetable to be Implementable, Target must be Populatable. var _ duck.Populatable = (*Target)(nil) // GetFullType implements duck.Implementable -func (_ *Targettable) GetFullType() duck.Populatable { +func (_ *Targetable) GetFullType() duck.Populatable { return &Target{} } // Populate implements duck.Populatable func (t *Target) Populate() { - t.Status.Targettable = &Targettable{ + t.Status.Targetable = &Targetable{ // Populate ALL fields Field: "this is not empty", } diff --git a/apis/duck/v1alpha1/zz_generated.deepcopy.go b/apis/duck/v1alpha1/zz_generated.deepcopy.go index 31041a02f..956448855 100644 --- a/apis/duck/v1alpha1/zz_generated.deepcopy.go +++ b/apis/duck/v1alpha1/zz_generated.deepcopy.go @@ -225,9 +225,9 @@ func (in *TargetList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TargetStatus) DeepCopyInto(out *TargetStatus) { *out = *in - if in.Targettable != nil { - in, out := &in.Targettable, &out.Targettable - *out = new(Targettable) + if in.Targetable != nil { + in, out := &in.Targetable, &out.Targetable + *out = new(Targetable) **out = **in } return @@ -244,17 +244,17 @@ func (in *TargetStatus) DeepCopy() *TargetStatus { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Targettable) DeepCopyInto(out *Targettable) { +func (in *Targetable) DeepCopyInto(out *Targetable) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Targettable. -func (in *Targettable) DeepCopy() *Targettable { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Targetable. +func (in *Targetable) DeepCopy() *Targetable { if in == nil { return nil } - out := new(Targettable) + out := new(Targetable) in.DeepCopyInto(out) return out }