ravivooda / stocks

1 stars 0 forks source link

Handle / in ticker in a better way than the hack below #21

Open github-actions[bot] opened 2 years ago

github-actions[bot] commented 2 years ago

https://github.com/ravivooda/stocks/blob/7a07a8d11a3b54cfc6a95a59d063d1e693f26dda/utils/letf.go#L18


    if aliasStockName, ok := knownAliases[trimmedInput]; ok {
        trimmedInput = aliasStockName
    }
    // TODO: Handle / in ticker in a better way than the hack below
    return strings.ReplaceAll(trimmedInput, "/", "_")
}

func FetchStockTicker(input string) models.StockTicker {