From 2ea1d124cc54141dc937dd4e631309f173fcfe20 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 5 Dec 2025 23:51:36 +0000 Subject: [PATCH] fix: rename param to avoid collision --- internal/paramutil/sentinel.go | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 internal/paramutil/sentinel.go diff --git a/internal/paramutil/sentinel.go b/internal/paramutil/sentinel.go deleted file mode 100644 index db07a19..0000000 --- a/internal/paramutil/sentinel.go +++ /dev/null @@ -1,31 +0,0 @@ -package paramutil - -import ( - "github.com/openai/openai-go/v3/internal/encoding/json/sentinel" -) - -// NullPtr returns a pointer to the zero value of the type T. -// When used with [MarshalObject] or [MarshalUnion], it will be marshaled as null. -// -// It is unspecified behavior to mutate the value pointed to by the returned pointer. -func NullPtr[T any]() *T { - return sentinel.NullPtr[T]() -} - -// IsNullPtr returns true if the pointer was created by [NullPtr]. -func IsNullPtr[T any](ptr *T) bool { - return sentinel.IsNullPtr(ptr) -} - -// NullSlice returns a non-nil slice with a length of 0. -// When used with [MarshalObject] or [MarshalUnion], it will be marshaled as null. -// -// It is undefined behavior to mutate the slice returned by [NullSlice]. -func NullSlice[T any]() []T { - return sentinel.NullSlice[T]() -} - -// IsNullSlice returns true if the slice was created by [NullSlice]. -func IsNullSlice[T any](slice []T) bool { - return sentinel.IsNullSlice(slice) -}