Skip to content

Commit cb78de8

Browse files
committed
run gofumpt with option -extra
1 parent a000300 commit cb78de8

22 files changed

+76
-76
lines changed

bitmap_commands.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type BitMapCmdable interface {
1212
BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd
1313
BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd
1414
BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd
15-
BitOpNot(ctx context.Context, destKey string, key string) *IntCmd
15+
BitOpNot(ctx context.Context, destKey, key string) *IntCmd
1616
BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd
1717
BitPosSpan(ctx context.Context, key string, bit int8, start, end int64, span string) *IntCmd
1818
BitField(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
@@ -92,7 +92,7 @@ func (c cmdable) BitOpXor(ctx context.Context, destKey string, keys ...string) *
9292
return c.bitOp(ctx, "xor", destKey, keys...)
9393
}
9494

95-
func (c cmdable) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd {
95+
func (c cmdable) BitOpNot(ctx context.Context, destKey, key string) *IntCmd {
9696
return c.bitOp(ctx, "not", destKey, key)
9797
}
9898

cluster_commands.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type ClusterCmdable interface {
1515
ClusterResetHard(ctx context.Context) *StatusCmd
1616
ClusterInfo(ctx context.Context) *StringCmd
1717
ClusterKeySlot(ctx context.Context, key string) *IntCmd
18-
ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd
18+
ClusterGetKeysInSlot(ctx context.Context, slot, count int) *StringSliceCmd
1919
ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd
2020
ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd
2121
ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd
@@ -101,7 +101,7 @@ func (c cmdable) ClusterKeySlot(ctx context.Context, key string) *IntCmd {
101101
return cmd
102102
}
103103

104-
func (c cmdable) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd {
104+
func (c cmdable) ClusterGetKeysInSlot(ctx context.Context, slot, count int) *StringSliceCmd {
105105
cmd := NewStringSliceCmd(ctx, "cluster", "getkeysinslot", slot, count)
106106
_ = c(ctx, cmd)
107107
return cmd

command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2020,7 +2020,7 @@ type XInfoConsumer struct {
20202020

20212021
var _ Cmder = (*XInfoConsumersCmd)(nil)
20222022

2023-
func NewXInfoConsumersCmd(ctx context.Context, stream string, group string) *XInfoConsumersCmd {
2023+
func NewXInfoConsumersCmd(ctx context.Context, stream, group string) *XInfoConsumersCmd {
20242024
return &XInfoConsumersCmd{
20252025
baseCmd: baseCmd{
20262026
ctx: ctx,

error.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func isBadConn(err error, allowTimeout bool, addr string) bool {
111111
return true
112112
}
113113

114-
func isMovedError(err error) (moved bool, ask bool, addr string) {
114+
func isMovedError(err error) (moved, ask bool, addr string) {
115115
if !isRedisError(err) {
116116
return
117117
}

extra/rediscmd/rediscmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func appendArg(b []byte, v interface{}) []byte {
123123
}
124124
}
125125

126-
func appendUTF8String(dst []byte, src []byte) []byte {
126+
func appendUTF8String(dst, src []byte) []byte {
127127
if isSimple(src) {
128128
dst = append(dst, src...)
129129
return dst

extra/rediscmd/rediscmd_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func TestGinkgo(t *testing.T) {
1414

1515
var _ = Describe("AppendArg", func() {
1616
DescribeTable("...",
17-
func(src string, wanted string) {
17+
func(src, wanted string) {
1818
b := appendArg(nil, src)
1919
Expect(string(b)).To(Equal(wanted))
2020
},

gears_commands.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ type GearsCmdable interface {
1212
TFunctionDelete(ctx context.Context, libName string) *StatusCmd
1313
TFunctionList(ctx context.Context) *MapStringInterfaceSliceCmd
1414
TFunctionListArgs(ctx context.Context, options *TFunctionListOptions) *MapStringInterfaceSliceCmd
15-
TFCall(ctx context.Context, libName string, funcName string, numKeys int) *Cmd
16-
TFCallArgs(ctx context.Context, libName string, funcName string, numKeys int, options *TFCallOptions) *Cmd
17-
TFCallASYNC(ctx context.Context, libName string, funcName string, numKeys int) *Cmd
18-
TFCallASYNCArgs(ctx context.Context, libName string, funcName string, numKeys int, options *TFCallOptions) *Cmd
15+
TFCall(ctx context.Context, libName, funcName string, numKeys int) *Cmd
16+
TFCallArgs(ctx context.Context, libName, funcName string, numKeys int, options *TFCallOptions) *Cmd
17+
TFCallASYNC(ctx context.Context, libName, funcName string, numKeys int) *Cmd
18+
TFCallASYNCArgs(ctx context.Context, libName, funcName string, numKeys int, options *TFCallOptions) *Cmd
1919
}
2020

2121
type TFunctionLoadOptions struct {
@@ -98,15 +98,15 @@ func (c cmdable) TFunctionListArgs(ctx context.Context, options *TFunctionListOp
9898

9999
// TFCall - invoke a function.
100100
// For more information - https://redis.io/commands/tfcall/
101-
func (c cmdable) TFCall(ctx context.Context, libName string, funcName string, numKeys int) *Cmd {
101+
func (c cmdable) TFCall(ctx context.Context, libName, funcName string, numKeys int) *Cmd {
102102
lf := libName + "." + funcName
103103
args := []interface{}{"TFCALL", lf, numKeys}
104104
cmd := NewCmd(ctx, args...)
105105
_ = c(ctx, cmd)
106106
return cmd
107107
}
108108

109-
func (c cmdable) TFCallArgs(ctx context.Context, libName string, funcName string, numKeys int, options *TFCallOptions) *Cmd {
109+
func (c cmdable) TFCallArgs(ctx context.Context, libName, funcName string, numKeys int, options *TFCallOptions) *Cmd {
110110
lf := libName + "." + funcName
111111
args := []interface{}{"TFCALL", lf, numKeys}
112112
if options != nil {
@@ -124,15 +124,15 @@ func (c cmdable) TFCallArgs(ctx context.Context, libName string, funcName string
124124

125125
// TFCallASYNC - invoke an asynchronous JavaScript function (coroutine).
126126
// For more information - https://redis.io/commands/TFCallASYNC/
127-
func (c cmdable) TFCallASYNC(ctx context.Context, libName string, funcName string, numKeys int) *Cmd {
127+
func (c cmdable) TFCallASYNC(ctx context.Context, libName, funcName string, numKeys int) *Cmd {
128128
lf := fmt.Sprintf("%s.%s", libName, funcName)
129129
args := []interface{}{"TFCALLASYNC", lf, numKeys}
130130
cmd := NewCmd(ctx, args...)
131131
_ = c(ctx, cmd)
132132
return cmd
133133
}
134134

135-
func (c cmdable) TFCallASYNCArgs(ctx context.Context, libName string, funcName string, numKeys int, options *TFCallOptions) *Cmd {
135+
func (c cmdable) TFCallASYNCArgs(ctx context.Context, libName, funcName string, numKeys int, options *TFCallOptions) *Cmd {
136136
lf := fmt.Sprintf("%s.%s", libName, funcName)
137137
args := []interface{}{"TFCALLASYNC", lf, numKeys}
138138
if options != nil {

generic_commands.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type GenericCmdable interface {
4040
Touch(ctx context.Context, keys ...string) *IntCmd
4141
TTL(ctx context.Context, key string) *DurationCmd
4242
Type(ctx context.Context, key string) *StatusCmd
43-
Copy(ctx context.Context, sourceKey string, destKey string, db int, replace bool) *IntCmd
43+
Copy(ctx context.Context, sourceKey, destKey string, db int, replace bool) *IntCmd
4444

4545
Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd
4646
ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *ScanCmd

geo_commands.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type GeoCmdable interface {
1515
GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd
1616
GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd
1717
GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd
18-
GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd
18+
GeoDist(ctx context.Context, key, member1, member2, unit string) *FloatCmd
1919
GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd
2020
}
2121

@@ -120,7 +120,7 @@ func (c cmdable) GeoSearchStore(ctx context.Context, key, store string, q *GeoSe
120120
}
121121

122122
func (c cmdable) GeoDist(
123-
ctx context.Context, key string, member1, member2, unit string,
123+
ctx context.Context, key, member1, member2, unit string,
124124
) *FloatCmd {
125125
if unit == "" {
126126
unit = "km"

internal/arg.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func AppendArg(b []byte, v interface{}) []byte {
5252
}
5353
}
5454

55-
func appendUTF8String(dst []byte, src []byte) []byte {
55+
func appendUTF8String(dst, src []byte) []byte {
5656
dst = append(dst, src...)
5757
return dst
5858
}

0 commit comments

Comments
 (0)