I’m trying to create a restful api using go. However for some reason after I successfully build the project. I run it and receive exit status 3221225506 a simple google search doesnt return me anything that makes any sense. So my question is what does 3221225506 mean is there a way for me to find the answer so that I dont have to bother you guys. I am new at go so apologies if this was an easy fix
import (
// "fmt"
"log"
"net/http"
"strings"
)
func handler(w http.ResponseWriter, r *http.Request) {
for i, v := range r.Header {
n, err := w.Write([]byte(i + ": " + strings.Join(v, "")))
if err != nil {
log.Println(err)
log.Println(n)
}
}
}
func main() {
http.HandleFunc("/", handler)
err := http.ListenAndServe(":8080", nil)
if err != nil {
log.Println(err)
}
}
Exit statuses are 8 bits - so there is no exit status 3221225506 as such. What should happen when you run your program is that either blocks with not output (listning for HTTP requests) or prints and error and exits with code zero (as it’s a return from main()).
Maybe show what you do and what you see, more precisely?
The program looks like it should work, and works for us who try it, so I suspect that no, it doesn’t. But your antivirus might block running new executables, or executables in a temp directory, or something like that.
I ran into this problem and had trouble finding answers on the net – have you checked if your Window machine’s “Application Experience” service is running?