Skip to content

Commit f32315e

Browse files
committed
Make Y* urls externally configurable
1 parent 09e62c3 commit f32315e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

finance.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,21 @@ func init() {
2424
Logger = log.New(os.Stderr, "", log.LstdFlags)
2525
}
2626

27+
var (
28+
// YFinURL is the URL of the yahoo service backend.
29+
YFinURL = "https://query2.finance.yahoo.com"
30+
YQuotePath = "/v7/finance/quote"
31+
YOptionsPrefix = "/v7/finance/options/"
32+
)
33+
2734
const (
2835
// YFinBackend is a constant representing the yahoo service backend.
2936
YFinBackend SupportedBackend = "yahoo"
30-
// YFinURL is the URL of the yahoo service backend.
31-
YFinURL string = "https://query2.finance.yahoo.com"
3237
// BATSBackend is a constant representing the uploads service backend.
3338
BATSBackend SupportedBackend = "bats"
3439
// BATSURL is the URL of the uploads service backend.
3540
BATSURL string = ""
3641

37-
YQuotePath = "/v7/finance/quote"
38-
YOptionsPrefix = "/v7/finance/options/"
39-
4042
// Private constants.
4143
// ------------------
4244

0 commit comments

Comments
 (0)