INNER CODE UNIT · Go

init

machinebox/remoto · console/www/main.go:23

func init() {
	s := &server{
		buffers: bpool.NewBufferPool(32),
	}
	http.HandleFunc("/definition", s.handleDefinitionSave())
	http.HandleFunc("/definition/", s.handleDefinitionView())
	http.HandleFunc("/", s.handleIndex())
}

type server struct {
	buffers *bpool.BufferPool
}

func (s *server) handleIndex() http.HandlerFunc {
	var init sync.Once
	var err error
	var tpl *plush.Template
	return func(w http.ResponseWriter, r *http.Request) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…