This is not how it works. it's not like PHP.

your server has to know the route(s) to a handler. That handler will take 
care of that particular hot.
In that hit you decide what to send back as a web-response.

Op donderdag 4 augustus 2022 om 21:16:53 UTC+2 schreef John Dutcher:

> I have a tiny server program in Go language (main2.go) running and 
> 'listening' on port 8080 in a Windows command prompt session. While running 
> I point a browser to http://localhost:8080/main2.go and main2.go executes 
> and places a small html form into the browser window to fill and submit. If 
> the form ACTION has any requested target for some other Go program or HTML 
> element resident in the same Windows folder as main2.go, the element 
> request is ignored .... ONLY 'main2.go' gets triggered to execute instead 
> in response to the POST request 'submitted'.
>
> I have tried all variations I can think of in the POST ACTION URL format 
> to get the POST to run an element in the Windows folder called 'main.go' 
> (instead of main2.go):
>
> ACTION examples:
> http://localhost:8080/main.go
> localhost:8080/main.go
> /main.go
> ../main.go
> ./main.go
>
> BUT, if I load the ACTION URL with something like 'https://www.google.com' 
> it brings the home page for Google right into the browser window no problem.
>
> Why can it not run main.go, which again, resides in the same Windows 
> folder as main2.go which is the Go program running as the swerver ?
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/1610ce0f-d21a-4c3e-8409-fb7888468681n%40googlegroups.com.

Reply via email to