This commit is contained in:
Adrian Gallagher
2016-03-13 00:07:19 +11:00
2 changed files with 6 additions and 6 deletions

View File

@@ -28,7 +28,7 @@ var (
WarningSSMSGlobalSMSNoContacts = "WARNING -- SMS Support disabled due to no enabled contacts."
WarningWebserverCredentialValuesEmpty = "WARNING -- Webserver support disabled due to empty Username/Password values."
WarningWebserverListenAddressInvalid = "WARNING -- Webserver support disabled due to invalid listen address."
WarningWebserverRootWebFolderInvalid = "WARNING -- Webserver support disabled due to missing web folder."
WarningWebserverRootWebFolderNotFound = "WARNING -- Webserver support disabled due to missing web folder."
)
type Webserver struct {
@@ -164,9 +164,9 @@ func CheckExchangeConfigValues() error {
}
func CheckWebserverValues() error {
_, err := ioutil.ReadDir("/web/")
_, err := ioutil.ReadDir("web/")
if err != nil {
return errors.New(WarningWebserverRootWebFolderInvalid)
return errors.New(WarningWebserverRootWebFolderNotFound)
}
if bot.config.Webserver.AdminUsername == "" || bot.config.Webserver.AdminPassword == "" {

View File

@@ -39,11 +39,11 @@ func (t *Ticker) PriceToString(cryptoCurrency, fiatCurrency, priceType string) s
}
}
func AddTickerPrice(m map[string]map[string]TickerPrice, cyrptocurrency, fiatcurrency string, price TickerPrice) {
mm, ok := m[cyrptocurrency]
func AddTickerPrice(m map[string]map[string]TickerPrice, cryptocurrency, fiatcurrency string, price TickerPrice) {
mm, ok := m[cryptocurrency]
if !ok {
mm = make(map[string]TickerPrice)
m[cyrptocurrency] = mm
m[cryptocurrency] = mm
}
mm[fiatcurrency] = price
}