On Tuesday, 4 July 2023 at 17:39:05 UTC+2 Gurunandan Bhat wrote:
Every example of http Handler that I have seen so far looks like this:
This is very strange as basically all correct http Handlers I have
seen in the last 10 years actually do return after http.Error.
If all examples of http
> Every example of http Handler that I have seen so far looks like this:
Yes, that's definitely odd. I just grepped my Go source directory (which
includes the Go compiler and stdlib and a bunch of other Go code), and
almost all of them have a "return" on the next line. For example:
$ rg
For a quick repro, I think it's worth noting that:
This does not work:
gomobile bind -target=ios golang.org/x/mobile/example/bind/hello
while this does:
gomobile build -target=ios -bundleid=com.example
golang.org/x/mobile/example/basic
Le mardi 4 juillet 2023 à 17:35:02 UTC-4, Scotty Davenport
Dear Go Authors,
I'm attempting to use gomobile to build an .xcframework to use inside an
iOS application.
MacOS: 13.4.1
Xcode: 14.3.1 (reproduced with 15.0 beta as well)
Gomobile: go install golang.org/x/mobile/cmd/gomobile@latest (as of now)
Unfortunately, when running `gomobile bind -v
I haven't experimented with Go/WASM for some time, so my experience may be
very out of date. But the size of the
binaries back a while ago meant that most folks were using TinyGo. I would
ask on the Gopher slack for more up to date experience, perhaps.
Or you could use GopherJS which means you
In a few months I will begin working on a component that can be used by
several of our web apps. Since I have time I wanted to experiment with
writing this in Go/WASM.
The Go code will be a set of functions that take a string and some options
(probably in JSON format) and return a string
On Tue, Jul 4, 2023 at 5:38 PM Gurunandan Bhat wrote:
> Every example of http Handler that I have seen so far looks like this:
>
> func handleSomeRequest(w http.ResponseWriter, r *http.Request) {
>
> // do something that returns an error
> if err != nil {
> http.Error(w,
Every example of http Handler that I have seen so far looks like this:
func handleSomeRequest(w http.ResponseWriter, r *http.Request) {
// do something that returns an error
if err != nil {
http.Error(w, "Something bad happened", http.SomeAppropriateStatus)
}
// do other