Skip to content
This repository has been archived by the owner on Jan 21, 2025. It is now read-only.

Commit

Permalink
fix: fix PR suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
dovixman committed Nov 6, 2023
1 parent 0a5b9c2 commit 254d235
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go-sdk/sdk/ephemeral-storage/ephemeral_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (es EphemeralStorage) Save(key string, payload []byte, overwrite ...bool) e
return errors.ErrUndefinedEphemeralStorage
}

if payload == nil {
if len(payload) == 0 {
return errors.ErrEmptyPayload
}

Expand Down
4 changes: 2 additions & 2 deletions go-sdk/sdk/persistent-storage/persistent_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (ps PersistentStorage) Save(key string, payload []byte, ttlDays ...int) (st
return "", errors.ErrEmptyKey
}

if payload == nil {
if len(payload) == 0 {
return "", errors.ErrEmptyPayload
}

Expand Down Expand Up @@ -184,7 +184,7 @@ func (ps PersistentStorage) ListVersions(key string) ([]string, error) {
Info(fmt.Sprintf("Object versions successfully retrieved for prefix %s from persistent storage", key))

for object := range objects {
if object.Key != "" && object.VersionID != "" {
if object.VersionID != "" {
objectList = append(objectList, fmt.Sprintf("%s - %s", object.Key, object.VersionID))
}
}
Expand Down

0 comments on commit 254d235

Please sign in to comment.