Skip to content

Commit

Permalink
refactor(container/gring): mark deprecated, package container/gring
Browse files Browse the repository at this point in the history
… will not be maintained in future (gogf#3665)
  • Loading branch information
gqcn authored Jun 27, 2024
1 parent 31a6ae2 commit c3cfc01
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 2 deletions.
3 changes: 2 additions & 1 deletion container/glist/glist.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
// You can obtain one at https://github.com/gogf/gf.
//

// Package glist provides most commonly used doubly linked list container which also supports concurrent-safe/unsafe switch feature.
// Package glist provides most commonly used doubly linked list container which also supports
// concurrent-safe/unsafe switch feature.
package glist

import (
Expand Down
6 changes: 6 additions & 0 deletions container/gring/gring.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// You can obtain one at https://github.com/gogf/gf.

// Package gring provides a concurrent-safe/unsafe ring(circular lists).
//
// Deprecated.
package gring

import (
Expand All @@ -15,6 +17,8 @@ import (
)

// Ring is a struct of ring structure.
//
// Deprecated.
type Ring struct {
mu *rwmutex.RWMutex
ring *ring.Ring // Underlying ring.
Expand All @@ -31,6 +35,8 @@ type internalRingItem struct {
// New creates and returns a Ring structure of `cap` elements.
// The optional parameter `safe` specifies whether using this structure in concurrent safety,
// which is false in default.
//
// Deprecated.
func New(cap int, safe ...bool) *Ring {
return &Ring{
mu: rwmutex.New(safe...),
Expand Down
1 change: 1 addition & 0 deletions container/gset/gset_any_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/gogf/gf/v2/util/gconv"
)

// Set is consisted of interface{} items.
type Set struct {
mu rwmutex.RWMutex
data map[interface{}]struct{}
Expand Down
1 change: 1 addition & 0 deletions container/gset/gset_int_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/gogf/gf/v2/util/gconv"
)

// IntSet is consisted of int items.
type IntSet struct {
mu rwmutex.RWMutex
data map[int]struct{}
Expand Down
1 change: 1 addition & 0 deletions container/gset/gset_str_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/gogf/gf/v2/util/gconv"
)

// StrSet is consisted of string items.
type StrSet struct {
mu rwmutex.RWMutex
data map[string]struct{}
Expand Down
2 changes: 1 addition & 1 deletion container/gvar/gvar.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://github.com/gogf/gf.

// Package gvar provides an universal variable type, like generics.
// Package gvar provides an universal variable type, like runtime generics.
package gvar

import (
Expand Down

0 comments on commit c3cfc01

Please sign in to comment.