[#486] put service: Fix error typo
Some checks failed
ci/woodpecker/pr/pre-commit Pipeline failed
Build / Build Components (1.19) (pull_request) Successful in 4m12s
Tests and linters / Tests (1.19) (pull_request) Successful in 2m52s
Tests and linters / Tests (1.20) (pull_request) Successful in 3m49s
Tests and linters / Staticcheck (pull_request) Successful in 3m13s
Tests and linters / Lint (pull_request) Successful in 10m50s
Build / Build Components (1.20) (pull_request) Successful in 11m28s
Tests and linters / Tests with -race (pull_request) Successful in 7m54s
ci/woodpecker/push/pre-commit Pipeline was successful
Some checks failed
ci/woodpecker/pr/pre-commit Pipeline failed
Build / Build Components (1.19) (pull_request) Successful in 4m12s
Tests and linters / Tests (1.19) (pull_request) Successful in 2m52s
Tests and linters / Tests (1.20) (pull_request) Successful in 3m49s
Tests and linters / Staticcheck (pull_request) Successful in 3m13s
Tests and linters / Lint (pull_request) Successful in 10m50s
Build / Build Components (1.20) (pull_request) Successful in 11m28s
Tests and linters / Tests with -race (pull_request) Successful in 7m54s
ci/woodpecker/push/pre-commit Pipeline was successful
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
fcbf90d31b
commit
a65e26878b
2 changed files with 3 additions and 3 deletions
|
@ -131,7 +131,7 @@ func (s *Service) validatePutSingleChecksum(obj *objectSDK.Object) error {
|
||||||
|
|
||||||
func (s *Service) validatePutSingleObject(ctx context.Context, obj *objectSDK.Object) error {
|
func (s *Service) validatePutSingleObject(ctx context.Context, obj *objectSDK.Object) error {
|
||||||
if err := s.fmtValidator.Validate(ctx, obj, false); err != nil {
|
if err := s.fmtValidator.Validate(ctx, obj, false); err != nil {
|
||||||
return fmt.Errorf("coult not validate object format: %w", err)
|
return fmt.Errorf("coud not validate object format: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err := s.fmtValidator.ValidateContent(obj)
|
_, err := s.fmtValidator.ValidateContent(obj)
|
||||||
|
|
|
@ -48,7 +48,7 @@ var (
|
||||||
|
|
||||||
func (t *validatingTarget) WriteHeader(ctx context.Context, obj *objectSDK.Object) error {
|
func (t *validatingTarget) WriteHeader(ctx context.Context, obj *objectSDK.Object) error {
|
||||||
if err := t.fmt.Validate(ctx, obj, true); err != nil {
|
if err := t.fmt.Validate(ctx, obj, true); err != nil {
|
||||||
return fmt.Errorf("(%T) coult not validate object format: %w", t, err)
|
return fmt.Errorf("(%T) could not validate object format: %w", t, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return t.nextTarget.WriteHeader(ctx, obj)
|
return t.nextTarget.WriteHeader(ctx, obj)
|
||||||
|
@ -93,7 +93,7 @@ func (t *validatingPreparedTarget) WriteHeader(ctx context.Context, obj *objectS
|
||||||
t.checksum = cs.Value()
|
t.checksum = cs.Value()
|
||||||
|
|
||||||
if err := t.fmt.Validate(ctx, obj, false); err != nil {
|
if err := t.fmt.Validate(ctx, obj, false); err != nil {
|
||||||
return fmt.Errorf("(%T) coult not validate object format: %w", t, err)
|
return fmt.Errorf("(%T) could not validate object format: %w", t, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
err := t.nextTarget.WriteHeader(ctx, obj)
|
err := t.nextTarget.WriteHeader(ctx, obj)
|
||||||
|
|
Loading…
Reference in a new issue