forked from TrueCloudLab/frostfs-node
[#1910] .golangci.yml: Add predeclared
linker
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
1cb892c579
commit
0d65888005
5 changed files with 11 additions and 10 deletions
|
@ -48,6 +48,7 @@ linters:
|
|||
- gofmt
|
||||
- goimports
|
||||
- misspell
|
||||
- predeclared
|
||||
- reassign
|
||||
- whitespace
|
||||
disable-all: true
|
||||
|
|
|
@ -127,13 +127,13 @@ func (cp *Processor) approvePutContainer(ctx *putContainerContext) {
|
|||
|
||||
// Process delete container operation from the user by checking container sanity
|
||||
// and sending approve tx back to morph.
|
||||
func (cp *Processor) processContainerDelete(delete *containerEvent.Delete) {
|
||||
func (cp *Processor) processContainerDelete(e *containerEvent.Delete) {
|
||||
if !cp.alphabetState.IsAlphabet() {
|
||||
cp.log.Info("non alphabet mode, ignore container delete")
|
||||
return
|
||||
}
|
||||
|
||||
err := cp.checkDeleteContainer(delete)
|
||||
err := cp.checkDeleteContainer(e)
|
||||
if err != nil {
|
||||
cp.log.Error("delete container check failed",
|
||||
zap.String("error", err.Error()),
|
||||
|
@ -142,7 +142,7 @@ func (cp *Processor) processContainerDelete(delete *containerEvent.Delete) {
|
|||
return
|
||||
}
|
||||
|
||||
cp.approveDeleteContainer(delete)
|
||||
cp.approveDeleteContainer(e)
|
||||
}
|
||||
|
||||
func (cp *Processor) checkDeleteContainer(e *containerEvent.Delete) error {
|
||||
|
|
|
@ -68,9 +68,9 @@ func WithWorkerPool(p util.WorkerPool) Option {
|
|||
}
|
||||
|
||||
// WithQueueCapacity returns option to set task queue capacity.
|
||||
func WithQueueCapacity(cap uint32) Option {
|
||||
func WithQueueCapacity(capacity uint32) Option {
|
||||
return func(c *cfg) {
|
||||
c.queueCap = cap
|
||||
c.queueCap = capacity
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -174,11 +174,11 @@ func payloadHashersForObject(obj *object.Object, withoutHomomorphicHash bool) []
|
|||
return hashers
|
||||
}
|
||||
|
||||
func (s *payloadSizeLimiter) release(close bool) (*AccessIdentifiers, error) {
|
||||
// Arg close is true only from Close method.
|
||||
func (s *payloadSizeLimiter) release(finalize bool) (*AccessIdentifiers, error) {
|
||||
// Arg finalize is true only when called from Close method.
|
||||
// We finalize parent and generate linking objects only if it is more
|
||||
// than 1 object in split-chain.
|
||||
withParent := close && len(s.previous) > 0
|
||||
withParent := finalize && len(s.previous) > 0
|
||||
|
||||
if withParent {
|
||||
writeHashes(s.parentHashers)
|
||||
|
|
|
@ -196,9 +196,9 @@ func WithRedundantCopyCallback(cb RedundantCopyCallback) Option {
|
|||
|
||||
// WithMaxCapacity returns option to set max capacity
|
||||
// that can be set to the pool.
|
||||
func WithMaxCapacity(cap int) Option {
|
||||
func WithMaxCapacity(capacity int) Option {
|
||||
return func(c *cfg) {
|
||||
c.maxCapacity = cap
|
||||
c.maxCapacity = capacity
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue