We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can somebody write any example handler for update?
func updateHandler(w http.ResponseWriter, r *http.Request){
file, err := os.Open("myprogram.exe")
etc....
}
The text was updated successfully, but these errors were encountered:
The server could implement a handler as below
func update(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, filepath.Join("path", "to", "myprogram.exe")) } ... http.HandleFunc("/update", update)
Given the doUpdate func as per the README.md, the client might then update itself like this
doUpdate
if *updateFlag { err := doUpdate("http://localhost/update") if err != nil { fmt.Println(err) os.Exit(1) } os.Exit(0) }
Sorry, something went wrong.
No branches or pull requests
can somebody write any example handler for update?
func updateHandler(w http.ResponseWriter, r *http.Request){
file, err := os.Open("myprogram.exe")
etc....
}
The text was updated successfully, but these errors were encountered: