Answer the question
In order to leave comments, you need to log in
Golang script won't run on Raspberry?
Installed on raspberry GO scripts like
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}
package main
import (
"fmt"
"log"
"net/http"
)
func main() {
http.HandleFunc("/",page)
port := ":8080"
fmt.Println("server start/ port:",port)
err := http.ListenAndServe(port,nil)
if err != nil {
log.Fatal("ListenAndServe",err)
}
}
func page(w http.ResponseWriter, r *http.Request) {
fmt.Println("open Main")
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question