Skip to content

Commit bb6c262

Browse files
Merge pull request #26 from johnbailon/remove-printf
Remove fmt.Printfs
2 parents f43859e + 376ae3c commit bb6c262

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

uploader.go

+2-9
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,6 @@ func (tt *TransactionUploader) PctComplete() float64 {
156156
* next chunk until it completes.
157157
*/
158158
func (tt *TransactionUploader) UploadChunk() error {
159-
defer func() {
160-
if tt.TotalChunks() > 0 {
161-
fmt.Printf("%f%% completes, %d/%d \n", tt.PctComplete(), tt.UploadedChunks(), tt.TotalChunks())
162-
}
163-
}()
164159
if tt.IsComplete() {
165160
return errors.New("Upload is already complete.")
166161
}
@@ -218,8 +213,7 @@ func (tt *TransactionUploader) UploadChunk() error {
218213
if err != nil {
219214
return err
220215
}
221-
body, statusCode, err := tt.Client.SubmitChunks(gc)
222-
fmt.Println("post tx chunk body: ", body)
216+
_, statusCode, err := tt.Client.SubmitChunks(gc)
223217
tt.LastRequestTimeEnd = time.Now().UnixNano() / 1000000
224218
tt.LastResponseStatus = statusCode
225219
if statusCode == 200 {
@@ -317,8 +311,7 @@ func (tt *TransactionUploader) uploadTx(withBody bool) error {
317311
// Post the Transaction with Data.
318312
tt.Transaction.Data = utils.Base64Encode(tt.Data)
319313
}
320-
body, statusCode, err := tt.Client.SubmitTransaction(tt.Transaction)
321-
fmt.Printf("uplaodTx; body: %s, status: %d, txId: %s \n", body, statusCode, tt.Transaction.ID)
314+
_, statusCode, err := tt.Client.SubmitTransaction(tt.Transaction)
322315
if err != nil {
323316
tt.LastResponseError = err.Error()
324317
return errors.New(fmt.Sprintf("Unable to upload Transaction: %d, %v", statusCode, err))

0 commit comments

Comments
 (0)