func main() { js.AddRoute("/", mainPage) js.RouterRun() response, err := http.Get("/edict") if err != nil { log.Panic(err) } var dictionary libkanji.Dictionary go func() { now := time.Now() log.Println("Started parsing dictionary this will take a while ...") dictionary = libkanji.ParseDictionary(response.Body, true) defer response.Body.Close() log.Printf("len %d", dictionary.Size()) log.Printf("Taken %v", time.Since(now)) }() }
func main() { js.AddRoute("/", mainPage) js.RouterRun() }
func main() { js.AddRoute(paths.main, mainPage) js.AddRoute(paths.second, secondPage) js.RouterRun() }