feat: enable unparam lint

Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
Wei Fu
2023-09-18 20:22:21 +08:00
parent be83fffedb
commit aea1cd0077
43 changed files with 122 additions and 141 deletions

View File

@ -357,14 +357,11 @@ func (c integrationClient) Txn(ctx context.Context, compares, ifSucess, ifFail [
}
cmps = append(cmps, *cmp)
}
succOps, err := getOps(ifSucess)
if err != nil {
return nil, err
}
failOps, err := getOps(ifFail)
if err != nil {
return nil, err
}
succOps := getOps(ifSucess)
failOps := getOps(ifFail)
txnrsp, err := txn.
If(cmps...).
Then(succOps...).
@ -373,7 +370,7 @@ func (c integrationClient) Txn(ctx context.Context, compares, ifSucess, ifFail [
return txnrsp, err
}
func getOps(ss []string) ([]clientv3.Op, error) {
func getOps(ss []string) []clientv3.Op {
var ops []clientv3.Op
for _, s := range ss {
s = strings.TrimSpace(s)
@ -387,7 +384,7 @@ func getOps(ss []string) ([]clientv3.Op, error) {
ops = append(ops, clientv3.OpDelete(args[1]))
}
}
return ops, nil
return ops
}
func (c integrationClient) Watch(ctx context.Context, key string, opts config.WatchOptions) clientv3.WatchChan {