func clearPage(cli storage.BlobStorageClient, name string, startByte, endByte int64) error { if err := cli.PutPage(cnt, name, startByte, endByte, storage.PageWriteTypeClear, nil); err != nil { url := cli.GetBlobURL(cnt, name) fmt.Printf("Failed to clear pages of %s: %s\n", url, err.Error()) return err } return nil }
func writePage(cli storage.BlobStorageClient, name string, startByte, endByte int64, chunk []byte) error { if err := cli.PutPage(cnt, name, startByte, endByte, storage.PageWriteTypeUpdate, chunk); err != nil { url := cli.GetBlobURL(cnt, name) fmt.Printf("Failed to write pages to %s: %s\n", url, err.Error()) return err } return nil }