Skip to content

Commit

Permalink
doc: add doc links on Deprecated notices
Browse files Browse the repository at this point in the history
Add doc links in deprecation notices mentionned in Go doc comments.

About doc links: https://go.dev/doc/comment#doclinks
  • Loading branch information
dolmen committed Feb 22, 2023
1 parent 439ee11 commit 34ad3da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func Buffer[T any](ch <-chan T, size int) (collection []T, length int, readTime

// Buffer creates a slice of n elements from a channel. Returns the slice and the slice length.
//
// Deprecated: Use lo.Buffer instead.
// Deprecated: Use [Buffer] instead.
func Batch[T any](ch <-chan T, size int) (collection []T, length int, readTime time.Duration, ok bool) {
return Buffer(ch, size)
}
Expand Down Expand Up @@ -248,7 +248,7 @@ func BufferWithTimeout[T any](ch <-chan T, size int, timeout time.Duration) (col

// BufferWithTimeout creates a slice of n elements from a channel, with timeout. Returns the slice and the slice length.
//
// Deprecated: Use lo.BufferWithTimeout instead.
// Deprecated: Use [BufferWithTimeout] instead.
func BatchWithTimeout[T any](ch <-chan T, size int, timeout time.Duration) (collection []T, length int, readTime time.Duration, ok bool) {
return BufferWithTimeout(ch, size, timeout)
}
Expand Down Expand Up @@ -281,7 +281,7 @@ func FanIn[T any](channelBufferCap int, upstreams ...<-chan T) <-chan T {
// ChannelMerge collects messages from multiple input channels into a single buffered channel.
// Output messages has no priority. When all upstream channels reach EOF, downstream channel closes.
//
// Deprecated: Use lo.FanIn instead.
// Deprecated: Use [FanIn] instead.
func ChannelMerge[T any](channelBufferCap int, upstreams ...<-chan T) <-chan T {
return FanIn(channelBufferCap, upstreams...)
}
Expand Down

0 comments on commit 34ad3da

Please sign in to comment.