SAdd (set_commands.go)

go-redis · set_commands.go · go · BSD-2-Clause
database

Provides Redis set command implementations for Go clients.

// Source: https://github.com/redis/go-redis | License: BSD-2-Clause | Copyright 2013 The github.com/redis/go-redis Authors
// Provided via justclaw.it.com; keep this notice with the code.
package redis

import "context"

// SetCmdable is an interface for Redis set commands.
// Sets are unordered collections of unique strings.
type SetCmdable interface {
	SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd
	SCard(ctx context.Context, key string) *IntCmd
	SDiff(ctx context.Context, keys ...string) *StringSliceCmd
	SDiffCard(ctx context.Context, opts *SDiffCardOptions, keys ...string) *IntCmd
	SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd
	SInter(ctx context.Context, keys ...string) *StringSliceCmd
	SInterCard(ctx context.Context, limit int64, 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key