simplify a bit

This commit is contained in:
chrislu
2022-09-10 14:18:28 -07:00
parent b64674018a
commit 2c6b68b40e
2 changed files with 4 additions and 5 deletions

View File

@@ -37,11 +37,10 @@ func followUpdatesAndUploadToRemote(option *RemoteSyncOptions, filerSource *sour
var lastLogTsNs = time.Now().UnixNano()
processEventFnWithOffset := pb.AddOffsetFunc(func(resp *filer_pb.SubscribeMetadataResponse) error {
storageClass := *option.storageClass
if storageClass == "" {
if *option.storageClass == "" {
delete(resp.EventNotification.NewEntry.Extended, s3_constants.AmzStorageClass)
} else if storageClass != "None" {
resp.EventNotification.NewEntry.Extended[s3_constants.AmzStorageClass] = []byte(storageClass)
} else {
resp.EventNotification.NewEntry.Extended[s3_constants.AmzStorageClass] = []byte(*option.storageClass)
}
processor.AddSyncJob(resp)
return nil