Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove pcommon.Immutable*Slice and related funcs #6107

Merged
merged 1 commit into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
- Delete deprecated `pcommon.Value.SetBytesVal`. (#6088)
- Delete deprecated `pmetric.Metric.SetDataType`. (#6095)
- Delete deprecated `plog.LogRecord.[Set]FlagStruct` funcs. (#6100)
- Delete deprecated `pcommon.ImmutableByteSlice` and `pcommon.NewImmutableByteSlice`. (#6107)
- Delete deprecated `pcommon.ImmutableFloat64Slice` and `pcommon.NewImmutableFloat64Slice`. (#6107)
- Delete deprecated `pcommon.ImmutableUInt64Slice` and `pcommon.NewImmutableUInt64Slice`. (#6107)

### 🚩 Deprecations 🚩

Expand Down
32 changes: 1 addition & 31 deletions pdata/pcommon/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func (v Value) SliceVal() Slice {
return newSlice(&arr.Values)
}

// BytesVal returns the ImmutableByteSlice value associated with this Value.
// BytesVal returns the ByteSlice value associated with this Value.
// If the Type() is not ValueTypeBytes then returns an invalid ByteSlice object. Note that using
// such slice can cause panic.
//
Expand Down Expand Up @@ -822,33 +822,3 @@ func (es Slice) FromRaw(rawSlice []interface{}) {
}
*es.getOrig() = origs
}

// Deprecated: [0.60.0] Use ByteSlice instead.
type ImmutableByteSlice = ByteSlice

// NewImmutableByteSlice creates a new ByteSlice by copying the provided []byte slice.
// Deprecated: [0.60.0] Use New{structName}() and {structName}.FromRaw([]byte) instead
func NewImmutableByteSlice(from []byte) ByteSlice {
orig := copyByteSlice(nil, from)
return ByteSlice(internal.NewByteSlice(&orig))
}

// Deprecated: [0.60.0] Use Float64Slice instead.
type ImmutableFloat64Slice = Float64Slice

// NewImmutableFloat64Slice creates a new Float64Slice by copying the provided []float64 slice.
// Deprecated: [0.60.0] Use New{structName}() and {structName}.FromRaw([]float64) instead
func NewImmutableFloat64Slice(from []float64) Float64Slice {
orig := copyFloat64Slice(nil, from)
return Float64Slice(internal.NewFloat64Slice(&orig))
}

// Deprecated: [0.60.0] Use UInt64Slice instead.
type ImmutableUInt64Slice = UInt64Slice

// NewImmutableUInt64Slice creates a new UInt64Slice by copying the provided []uint64 slice.
// Deprecated: [0.60.0] Use New{structName}() and {structName}.FromRaw([]uint64) instead
func NewImmutableUInt64Slice(from []uint64) UInt64Slice {
orig := copyUInt64Slice(nil, from)
return UInt64Slice(internal.NewUInt64Slice(&orig))
}