Skip to content

Commit

Permalink
keeping the linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
tombuildsstuff committed Aug 28, 2019
1 parent cb1278d commit d4d4052
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions azurerm/internal/services/storage/blobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (sbu BlobUpload) uploadPageBlob(ctx context.Context) error {

// first let's create a file of the specified file size
input := blobs.PutPageBlobInput{
BlobContentLengthBytes: int64(fileSize),
BlobContentLengthBytes: fileSize,
ContentType: utils.String(sbu.ContentType),
MetaData: sbu.MetaData,
}
Expand All @@ -167,7 +167,7 @@ type storageBlobPage struct {
section *io.SectionReader
}

func (sbu BlobUpload) pageUploadFromSource(ctx context.Context, file *os.File, fileSize int64) error {
func (sbu BlobUpload) pageUploadFromSource(ctx context.Context, file io.ReaderAt, fileSize int64) error {
workerCount := sbu.Parallelism * runtime.NumCPU()

// first we chunk the file and assign them to 'pages'
Expand Down Expand Up @@ -214,7 +214,7 @@ const (
maxPageSize int64 = 4 * 1024 * 1024
)

func (sbu BlobUpload) storageBlobPageSplit(file *os.File, fileSize int64) ([]storageBlobPage, error) {
func (sbu BlobUpload) storageBlobPageSplit(file io.ReaderAt, fileSize int64) ([]storageBlobPage, error) {
// whilst the file Size can be any arbitrary Size, it must be uploaded in fixed-Size pages
blobSize := fileSize
if fileSize%minPageSize != 0 {
Expand Down

0 comments on commit d4d4052

Please sign in to comment.