Summary
opensearch.ToPointer is marked Deprecated and slated for removal. It is intentionally not part of the public API going forward — internal consumers use the unexported per-package ptr helper, and generated *Params fields no longer need a public wrapper.
Location
opensearch.go:638-647
// ToPointer converts any value to a pointer, mainly used for request parameters
//
// Deprecated: ToPointer will be removed before v5. The helper is intentionally not
// part of the public API going forward; consumers within this module use the
// unexported `ptr` defined per-package. Once the module's go directive moves
// to 1.26, callers can drop any wrapper in favor of the native new(value)
// form (e.g. new(false)).
func ToPointer[V any](value V) *V {
return ptr(value)
}
Acceptance criteria
Out of scope
Deleting the unexported ptr helper (gated on the Go 1.26 directive bump — tracked separately).
Summary
opensearch.ToPointeris markedDeprecatedand slated for removal. It is intentionally not part of the public API going forward — internal consumers use the unexported per-packageptrhelper, and generated*Paramsfields no longer need a public wrapper.Location
opensearch.go:638-647Acceptance criteria
ToPointerfunction.opensearch_internal_test.go:521TestToPointer).CHANGELOG.mdentry under the v5 Removed section.UPGRADING.md: callers replaceopensearch.ToPointer(v)with their own one-line helper, ornew(value)once Go 1.26 is the floor.Out of scope
Deleting the unexported
ptrhelper (gated on the Go 1.26 directive bump — tracked separately).