diff --git a/enterprise/internal/batches/webhooks/util.go b/enterprise/internal/batches/webhooks/util.go index 4861ee1eba8..72a143206e9 100644 --- a/enterprise/internal/batches/webhooks/util.go +++ b/enterprise/internal/batches/webhooks/util.go @@ -5,27 +5,11 @@ import ( "context" "encoding/json" "net/http" - "reflect" "github.com/sourcegraph/sourcegraph/internal/httpcli" "github.com/sourcegraph/sourcegraph/lib/errors" ) -func nullable[T any](value T) *T { - if reflect.ValueOf(value).IsZero() { - return nil - } - return &value -} - -func nullableMap[T, U any](value T, mapper func(T) U) *U { - if reflect.ValueOf(value).IsZero() { - return nil - } - mapped := mapper(value) - return &mapped -} - func makeRequest[T any](ctx context.Context, q queryInfo, client httpcli.Doer, res T) error { reqBody, err := json.Marshal(q) if err != nil {