Use logging and error libraries from function-sdk-go

Remove our direct dependency on crossplane-runtime by using the error and
logging packages included in function-sdk-go in place of the ones from
crossplane-runtime. These packages behave identically to the crossplane-runtime
versions.

Signed-off-by: Adam Wolfe Gordon <awg@upbound.io>
This commit is contained in:
Adam Wolfe Gordon 2025-03-05 09:41:17 -07:00
parent 13ec211af3
commit 1c52a6ddca
3 changed files with 4 additions and 4 deletions

4
fn.go
View File

@ -3,8 +3,8 @@ package main
import (
"context"
"github.com/crossplane/crossplane-runtime/pkg/errors"
"github.com/crossplane/crossplane-runtime/pkg/logging"
"github.com/crossplane/function-sdk-go/errors"
"github.com/crossplane/function-sdk-go/logging"
fnv1 "github.com/crossplane/function-sdk-go/proto/v1"
"github.com/crossplane/function-sdk-go/request"
"github.com/crossplane/function-sdk-go/response"

View File

@ -9,7 +9,7 @@ import (
"google.golang.org/protobuf/testing/protocmp"
"google.golang.org/protobuf/types/known/durationpb"
"github.com/crossplane/crossplane-runtime/pkg/logging"
"github.com/crossplane/function-sdk-go/logging"
fnv1 "github.com/crossplane/function-sdk-go/proto/v1"
"github.com/crossplane/function-sdk-go/resource"
"github.com/crossplane/function-sdk-go/response"

2
go.mod
View File

@ -6,7 +6,6 @@ toolchain go1.23.2
require (
github.com/alecthomas/kong v0.9.0
github.com/crossplane/crossplane-runtime v1.18.0
github.com/crossplane/function-sdk-go v0.4.0
github.com/google/go-cmp v0.6.0
google.golang.org/protobuf v1.34.3-0.20240816073751-94ecbc261689
@ -16,6 +15,7 @@ require (
require (
dario.cat/mergo v1.0.1 // indirect
github.com/crossplane/crossplane-runtime v1.18.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect