Skip to content

Commit 672676d

Browse files
committed
Fix linter issues
Signed-off-by: Hasan Turken <[email protected]>
1 parent 9eb5c3b commit 672676d

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

fn.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ package main
33
import (
44
"context"
55
"fmt"
6-
"github.com/crossplane/function-sdk-go/resource"
76

87
"github.com/crossplane/crossplane-runtime/pkg/errors"
98
"github.com/crossplane/crossplane-runtime/pkg/logging"
109
fnv1beta1 "github.com/crossplane/function-sdk-go/proto/v1beta1"
1110
"github.com/crossplane/function-sdk-go/request"
11+
"github.com/crossplane/function-sdk-go/resource"
1212
"github.com/crossplane/function-sdk-go/response"
1313
"github.com/crossplane/function-sequencer/input/v1beta1"
1414
)
@@ -21,7 +21,7 @@ type Function struct {
2121
}
2222

2323
// RunFunction runs the Function.
24-
func (f *Function) RunFunction(_ context.Context, req *fnv1beta1.RunFunctionRequest) (*fnv1beta1.RunFunctionResponse, error) {
24+
func (f *Function) RunFunction(_ context.Context, req *fnv1beta1.RunFunctionRequest) (*fnv1beta1.RunFunctionResponse, error) { //nolint:gocyclo // This function is unavoidably complex.
2525
f.log.Info("Running function", "tag", req.GetMeta().GetTag())
2626

2727
rsp := response.To(req, response.DefaultTTL)

input/v1beta1/input.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@
55
package v1beta1
66

77
import (
8-
"github.com/crossplane/function-sdk-go/resource"
98
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
9+
10+
"github.com/crossplane/function-sdk-go/resource"
1011
)
1112

1213
// This isn't a custom resource, in the sense that we never install its CRD.
1314
// It is a KRM-like object, so we generate a CRD to describe its schema.
1415

16+
// SequencingRule is a rule that describes a sequence of resources.
1517
type SequencingRule struct {
16-
// TODO: InferFromUsages
18+
// TODO: Should we add a way to infer sequencing from usages? e.g. InferFromUsages: true
1719
// InferFromUsages bool `json:"inferFromUsages,omitempty"`
1820
Sequence []resource.Name `json:"sequence,omitempty"`
1921
}
@@ -26,5 +28,6 @@ type Input struct {
2628
metav1.TypeMeta `json:",inline"`
2729
metav1.ObjectMeta `json:"metadata,omitempty"`
2830

31+
// Rules is a list of rules that describe sequences of resources.
2932
Rules []SequencingRule `json:"rules"`
3033
}

0 commit comments

Comments
 (0)