Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Commit 9a0b07b

Browse files
committed
[get ticker] print errors on stderr (closes #2).
1 parent 7847fbd commit 9a0b07b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/getticker/getticker.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package getticker
22

33
import (
44
"fmt"
5-
"log"
65
"net/http"
6+
"os"
77
"time"
88

99
"github.com/toorop/go-bittrex"
@@ -64,7 +64,8 @@ func innerLoop(btrc *bittrex.Bittrex) {
6464
now := time.Now().UTC()
6565
ticker, err := btrc.GetTicker("USDT-BTC")
6666
if err != nil {
67-
log.Fatal(err.Error())
67+
fmt.Fprintf(os.Stderr, "ERROR %s %s", time.Now().UTC().String(), err.Error())
68+
return
6869
}
6970

7071
printTicker(&now, &ticker)

0 commit comments

Comments
 (0)