create UI
This commit is contained in:
@@ -85,7 +85,6 @@ func main() {
|
||||
if predictionMonths, err := strconv.ParseInt(r.URL.Query().Get("predictionMonths"), 10, 16); err == nil && predictionMonths > 0 {
|
||||
window := time.Hour * 24.0 * 365.0 / 12.0 * time.Duration(predictionMonths)
|
||||
// TODO whatif
|
||||
// TODO ana.Prediction
|
||||
prediction := make(ana.Prediction, 0)
|
||||
for _, spec := range r.URL.Query()["prediction"] {
|
||||
idx := strings.Index(spec, "=")
|
||||
@@ -154,6 +153,14 @@ func main() {
|
||||
default:
|
||||
http.NotFound(w, r)
|
||||
return
|
||||
case "/ui":
|
||||
f, err := os.Open("./index.html")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer f.Close()
|
||||
io.Copy(w, f)
|
||||
return
|
||||
case "/bal":
|
||||
for _, name := range names {
|
||||
currencyDateValue := nameCurrencyDateValue[name]
|
||||
|
||||
Reference in New Issue
Block a user