mirror of
https://github.com/kopia/kopia.git
synced 2025-12-23 22:57:50 -05:00
Remove unused-parameter exclusion for `ctx` in revive linter. --------- Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com> Co-authored-by: Matthieu MOREL <matthieu.morel35@gmail.com>
31 lines
638 B
Go
31 lines
638 B
Go
package cli
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/pkg/errors"
|
|
|
|
"github.com/kopia/kopia/repo"
|
|
)
|
|
|
|
type commandRepositoryThrottleGet struct {
|
|
ctg commonThrottleGet
|
|
}
|
|
|
|
func (c *commandRepositoryThrottleGet) setup(svc appServices, parent commandParent) {
|
|
cmd := parent.Command("get", "Get throttling parameters for a repository")
|
|
c.ctg.setup(svc, cmd)
|
|
|
|
cmd.Action(svc.directRepositoryReadAction(c.run))
|
|
}
|
|
|
|
func (c *commandRepositoryThrottleGet) run(_ context.Context, rep repo.DirectRepository) error {
|
|
limits := rep.Throttler().Limits()
|
|
|
|
if err := c.ctg.output(&limits); err != nil {
|
|
return errors.Wrap(err, "output")
|
|
}
|
|
|
|
return nil
|
|
}
|