Introduction

A collection is a set of non-repeating elements, where the elements can be of any type.

At the same time, gset supports optional concurrent safety parameters for concurrent-safe scenarios.

Use Cases:

Collection operations.

Usage:

  1. import "github.com/gogf/gf/v2/container/gset"

Interface Documentation: https://pkg.go.dev/github.com/gogf/gf/v2/container/gset

Documentation

📄️ Set - UsageUsing set types and their basic operation methods in the GoFrame framework, including creating, adding, deleting, and traversing sets, as well as exploring advanced operations such as intersection, difference, union, and complement. In addition, the article also provides detailed explanations on inclusion judgment, set item popping, subset judgment, conditional writing, and demonstrates JSON serialization and deserialization with code examples.

📄️ Set - PerformancePerformance test results of collection types in the GoFrame framework, including benchmark tests for set operations with various data types such as integers, any data type, and strings. These benchmarks illustrate the performance metrics of different set operations, helping developers to optimize code performance and improve efficiency when building high-performance applications using the GoFrame framework.

📄️ Set - MethodsImplement basic set operations using the GoFrame library, including creating sets, adding elements, set operations, element checking and removal, set iteration, among others. It also provides concrete code examples to help understand and apply these methods.