|
|
@ -80,6 +80,7 @@ func (layout *Layout) Market(market *Market) string { |
|
|
|
// and the list of given stock quotes. It returns formatted string with
|
|
|
|
// and the list of given stock quotes. It returns formatted string with
|
|
|
|
// all the necessary markup.
|
|
|
|
// all the necessary markup.
|
|
|
|
func (layout *Layout) Quotes(quotes *Quotes) string { |
|
|
|
func (layout *Layout) Quotes(quotes *Quotes) string { |
|
|
|
|
|
|
|
zonename, _ := time.Now().In(time.Local).Zone() |
|
|
|
if ok, err := quotes.Ok(); !ok { // If there was an error fetching stock quotes...
|
|
|
|
if ok, err := quotes.Ok(); !ok { // If there was an error fetching stock quotes...
|
|
|
|
return err // then simply return the error string.
|
|
|
|
return err // then simply return the error string.
|
|
|
|
} |
|
|
|
} |
|
|
@ -89,7 +90,7 @@ func (layout *Layout) Quotes(quotes *Quotes) string { |
|
|
|
Header string // Formatted header line.
|
|
|
|
Header string // Formatted header line.
|
|
|
|
Stocks []Stock // List of formatted stock quotes.
|
|
|
|
Stocks []Stock // List of formatted stock quotes.
|
|
|
|
}{ |
|
|
|
}{ |
|
|
|
time.Now().Format(`3:04:05pm PST`), |
|
|
|
time.Now().Format(`3:04:05pm ` + zonename), |
|
|
|
layout.Header(quotes.profile), |
|
|
|
layout.Header(quotes.profile), |
|
|
|
layout.prettify(quotes), |
|
|
|
layout.prettify(quotes), |
|
|
|
} |
|
|
|
} |
|
|
|