Skip to content

Commit d77d7cd

Browse files
authored
Merge pull request #135 from fanminshi/improve_auery_comments
pkg/sdk/query: improve query APIs's comments
2 parents 0b1d530 + 6ea20e9 commit d77d7cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/sdk/query/query.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ import (
2222
"github.com/coreos/operator-sdk/pkg/util/k8sutil"
2323
)
2424

25-
// Get gets the kubernetes object and then unmarshals the retrieved data into the "into" object.
25+
// Get gets the specified object and unmarshals the retrieved data into the "into" object.
2626
// "into" is a sdkTypes.Object that must have
2727
// "Kind" and "APIVersion" specified in its "TypeMeta" field
2828
// and "Name" and "Namespace" specified in its "ObjectMeta" field.
29-
// Those fields are used to construct the underlying resource client.
3029
// "opts" configures the Get operation.
30+
// When passed With WithGetOptions(o), the specified metav1.GetOptions is set.
3131
func Get(into sdkTypes.Object, opts ...GetOption) error {
3232
name, namespace, err := k8sutil.GetNameAndNamespace(into)
3333
if err != nil {
@@ -55,8 +55,8 @@ func Get(into sdkTypes.Object, opts ...GetOption) error {
5555
// "namespace" indicates which kubernetes namespace to look for the list of kubernetes objects.
5656
// "into" is a sdkType.Object that must have
5757
// "Kind" and "APIVersion" specified in its "TypeMeta" field
58-
// Those are used to construct the underlying resource client.
5958
// "opts" configures the List operation.
59+
// When passed With WithListOptions(o), the specified metav1.ListOptions is set.
6060
func List(namespace string, into sdkTypes.Object, opts ...ListOption) error {
6161
gvk := into.GetObjectKind().GroupVersionKind()
6262
apiVersion, kind := gvk.ToAPIVersionAndKind()

0 commit comments

Comments
 (0)