From 6ea20e914f02cff228cc80e4806d016ef41ca59f Mon Sep 17 00:00:00 2001 From: fanmin shi Date: Mon, 26 Mar 2018 17:02:30 -0700 Subject: [PATCH] pkg/sdk/query: improve query APIs's comments --- pkg/sdk/query/query.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/sdk/query/query.go b/pkg/sdk/query/query.go index cbe3a68dd06..55903cfc5cc 100644 --- a/pkg/sdk/query/query.go +++ b/pkg/sdk/query/query.go @@ -22,12 +22,12 @@ import ( "github.com/coreos/operator-sdk/pkg/util/k8sutil" ) -// Get gets the kubernetes object and then unmarshals the retrieved data into the "into" object. +// Get gets the specified object and unmarshals the retrieved data into the "into" object. // "into" is a sdkTypes.Object that must have // "Kind" and "APIVersion" specified in its "TypeMeta" field // and "Name" and "Namespace" specified in its "ObjectMeta" field. -// Those fields are used to construct the underlying resource client. // "opts" configures the Get operation. +// When passed With WithGetOptions(o), the specified metav1.GetOptions is set. func Get(into sdkTypes.Object, opts ...GetOption) error { name, namespace, err := k8sutil.GetNameAndNamespace(into) if err != nil { @@ -55,8 +55,8 @@ func Get(into sdkTypes.Object, opts ...GetOption) error { // "namespace" indicates which kubernetes namespace to look for the list of kubernetes objects. // "into" is a sdkType.Object that must have // "Kind" and "APIVersion" specified in its "TypeMeta" field -// Those are used to construct the underlying resource client. // "opts" configures the List operation. +// When passed With WithListOptions(o), the specified metav1.ListOptions is set. func List(namespace string, into sdkTypes.Object, opts ...ListOption) error { gvk := into.GetObjectKind().GroupVersionKind() apiVersion, kind := gvk.ToAPIVersionAndKind()