Skip to content

Commit

Permalink
go fmt ./**
Browse files Browse the repository at this point in the history
  • Loading branch information
arielshaqed committed Mar 24, 2021
1 parent 1165f46 commit 1740409
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions pkg/api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ func (c *client) ClientUpload(ctx context.Context, repoID, branchID, path string
}
stagingLocation := resp.GetPayload()

for { // Return from inside loop
for { // Return from inside loop
physicalAddress, err := url.Parse(stagingLocation.PhysicalAddress)

if err != nil {
Expand All @@ -778,9 +778,9 @@ func (c *client) ClientUpload(ctx context.Context, repoID, branchID, path string

// TODO(ariels): Allow customization of request
putObjectResponse, err := svc.PutObject(&s3.PutObjectInput{
Body: contents,
Body: contents,
Bucket: &bucket,
Key: &physicalAddress.Path,
Key: &physicalAddress.Path,
})
if err != nil {
return nil, fmt.Errorf("upload to backing store %v: %w", physicalAddress, err)
Expand All @@ -797,13 +797,13 @@ func (c *client) ClientUpload(ctx context.Context, repoID, branchID, path string

_, err = c.remote.Staging.LinkPhysicalAddress(&staging.LinkPhysicalAddressParams{
Repository: repoID,
Branch: branchID,
Path: path,
Branch: branchID,
Path: path,
Metadata: &models.StagingMetadata{
Checksum: putObjectResponse.ETag,
SizeBytes: &size,
Checksum: putObjectResponse.ETag,
SizeBytes: &size,
UserMetadata: metadata,
Staging: stagingLocation,
Staging: stagingLocation,
},
Context: ctx,
}, c.auth)
Expand All @@ -812,11 +812,11 @@ func (c *client) ClientUpload(ctx context.Context, repoID, branchID, path string
Checksum: *putObjectResponse.ETag,
// BUG(ariels): Unavailable on S3, remove this field entirely
// OR add it to the server staging manager API.
Mtime: time.Now().Unix(),
Path: path,
PathType: models.ObjectStatsPathTypeObject,
Mtime: time.Now().Unix(),
Path: path,
PathType: models.ObjectStatsPathTypeObject,
PhysicalAddress: stagingLocation.PhysicalAddress,
SizeBytes: &size,
SizeBytes: &size,
}, nil
}
conflict, ok := err.(*staging.LinkPhysicalAddressConflict)
Expand Down

0 comments on commit 1740409

Please sign in to comment.