32 lines
582 B
Go
32 lines
582 B
Go
package main
|
|
|
|
// #cgo LDFLAGS: -lm
|
|
// #include "img.h"
|
|
import "C"
|
|
import (
|
|
"fmt"
|
|
// "html/template"
|
|
"net/http"
|
|
)
|
|
|
|
func GetHome(w http.ResponseWriter, r *http.Request) {
|
|
filename := C.CString("Skydusky.3d")
|
|
img := C.img_open_survey(filename, nil)
|
|
for true {
|
|
p := C.img_point{}
|
|
C.img_read_item(img, &p)
|
|
fmt.Printf(C.GoString(img.label))
|
|
}
|
|
//
|
|
// // return index.html
|
|
// t, err := template.ParseFS(templatesHTML, "templates/index.html.tmpl")
|
|
// if !checkWebError(w, err) {
|
|
// return
|
|
// }
|
|
//
|
|
// err = t.Execute(w, nil)
|
|
// if !checkError(err) {
|
|
// return
|
|
// }
|
|
}
|