sample-golang
sample-golang copied to clipboard
⛵ App Platform sample Golang application.
Minor code update: - Using `r.URL.Query().Get("...")` instead of `r.URL.Query()["..."]` where this is the case - Using modern `strings.Cut` instead of `strings.SplitN(..., 2)` - Bumping required go version up to 1.18...
In my humble opinion sorted variables are more readable. By the way, `envs = append(envs, os.Environ()...)` seems useless, `os.Environ()` does the trick for you (it calls [`syscall.Environ()`](https://cs.opensource.google/go/go/+/refs/tags/go1.21.5:src/syscall/env_unix.go;l=139))
This PR cleans up the `http.ListenAndServe` if statement by removing the redundant `Sprintf` call, it's already available from earlier in `main`. So no need to duplicate it again. https://github.com/digitalocean/sample-golang/blob/0033b3f954ea06f154807969405a2388db74551b/main.go#L121 Also...
Duplicate of my PR for the express sample (https://github.com/digitalocean/sample-expressjs/pull/11) where I fixed the broken startup message. This Sammy also deserves to be fixed. 👍 ### Before ![Screen Shot 2023-02-27 at...
Hello, I am new to digitalocean app platform. I have created a simple hello world golang application and tried to deploy it with digitalocean. But I am getting Deploy Error:...