not found error on windows
this is my modd.conf **/*.go { prep: go test @dirmods }
**/*.go { prep: go build -o lenslocked . daemon +sigterm: ./lenslocked } and this is my main.go package main
import ( "fmt" "net/http" )
func handlerFunc(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, "<h1> welcome to my site</h1>")
} func main() { http.HandleFunc("/", handlerFunc) fmt.Println("starting on :3000...") http.ListenAndServe(":3000", nil) }
Hi, what says "not found"? go build, modd doing ./lenslocked or something else? all those work in windows shell?
I encountered the same error on windows , which was due to the package not being able to find the correct path when using the daemon and SIGTERM. Using the full path resolved the issue for me. You might try the following:
daemon +sigterm: bash -c 'PWD=$(pwd) ./lenslocked'