Re: [go-nuts] Statically linking cgo

2016-12-24 Thread Matt Harden
Try this? http://blog.madewithdrew.com/post/statically-linking-c-to-go/ On Sat, Dec 24, 2016 at 6:58 PM Justin Israel wrote: > > > On Sun, Dec 25, 2016, 2:43 PM James Pettyjohn > wrote: > > Hi Justin, > > Thanks for the holiday reply. > > The

Re: [go-nuts] Converting escaped unicode to utf8

2016-12-24 Thread Matt Harden
If it has a JSON body, are you using encoding/json to parse / decode it? That will handle the unescaping for you. On Sat, Dec 24, 2016 at 4:54 PM JohnGB wrote: > I have an application where I am processing a HTTP request with a JSON > body. However, the JSON in the body

Re: [go-nuts] Statically linking cgo

2016-12-24 Thread Justin Israel
On Sun, Dec 25, 2016, 2:43 PM James Pettyjohn wrote: > Hi Justin, > > Thanks for the holiday reply. > > The ultimate goal in this was deployment into docker as a self contained > binary, no dynamic library dependencies and no parent image. The most > common solution to

Re: [go-nuts] Statically linking cgo

2016-12-24 Thread James Pettyjohn
Hi Justin, Thanks for the holiday reply. The ultimate goal in this was deployment into docker as a self contained binary, no dynamic library dependencies and no parent image. The most common solution to this I've seen is disable CGO altogether but with the libraries I'm using this is not an

Re: [go-nuts] Statically linking cgo

2016-12-24 Thread Justin Israel
On Sun, Dec 25, 2016 at 9:22 AM James Pettyjohn wrote: > I've been looking at a number of articles on statically linking go files > by disabling CGO, sounds great except I've got a libsass dependency until > the native libsass is ready. > > Can this be in a straightforward

[go-nuts] Converting escaped unicode to utf8

2016-12-24 Thread JohnGB
I have an application where I am processing a HTTP request with a JSON body. However, the JSON in the body has been unicode escaped, so instead of `wasn't`, I get `wasn\u0027t`. What is the simplest way to unescape this text back to utf8 encoded text. i.e. convert `wasn\u0027t` to `wasn't`.

Re: [go-nuts] Re: Gomobile: Getting errors when trying to build reverse example

2016-12-24 Thread Daniel Skinner
You're right, I failed to consider the constants on Service. I thought I saw something about this recently but it just turned out to be you five days ago :) On Sat, Dec 24, 2016 at 4:27 PM andrey mirtchovski wrote: > Apologies for the digression. > > > This suggests that

[go-nuts] Re: Donating to Go/related causes

2016-12-24 Thread Florin Pățan
Hi there, I'm happy to hear that there's one more Gopher that would like to help out the community. This is exciting! Here are some of my ideas around this: - this is where your time is best spent on: https://blog.gopheracademy.com/advent-2016/gobridge-beginners/ imho - or add docs to the

Re: [go-nuts] Re: Gomobile: Getting errors when trying to build reverse example

2016-12-24 Thread andrey mirtchovski
Apologies for the digression. > This suggests that you still have multiple `app` imports without each > having a unique name. Double check your imports in all source files being > compiled. > I have renamed both imports to something else and ensured there is nothing importing or using "app",

[go-nuts] Re: write barrier and C types

2016-12-24 Thread 'Florian Uekermann' via golang-nuts
I just want to leave my solution here, since I am sure I am not the last person to run into this. The issue (as others have suggested and initially assumed) is indeed that go expects a pointer where there is none. This only leads to errors when the GC scans the stack if I interpret my results

Re: [go-nuts] Re: Gomobile: Getting errors when trying to build reverse example

2016-12-24 Thread Daniel Skinner
> app redeclared as imported package name This suggests that you still have multiple `app` imports without each having a unique name. Double check your imports in all source files being compiled. > import "Java/android/app/Service" I'd imagine `Service` is not a package and not something you

[go-nuts] Statically linking cgo

2016-12-24 Thread James Pettyjohn
I've been looking at a number of articles on statically linking go files by disabling CGO, sounds great except I've got a libsass dependency until the native libsass is ready. Can this be in a straightforward manner with go 1.6/1.7 on linux (centos)? -- You received this message because you

Re: [go-nuts] Re: Gomobile: Getting errors when trying to build reverse example

2016-12-24 Thread andrey mirtchovski
> I haven't used these bindings but wouldn't you rename the v7 import as > > sapp "Java/android/support/v7/app" > > and then import > > "Java/android/app" > I'm still struggling with this. In my case I need v7.app as well as android.app and android.app.Service, so my imports are (as per your

Re: [go-nuts] Re: Gomobile: Getting errors when trying to build reverse example

2016-12-24 Thread Daniel Skinner
I haven't used these bindings but wouldn't you rename the v7 import as sapp "Java/android/support/v7/app" and then import "Java/android/app" then reference `app.AlertDialog` as appropriate? You'll also need to call `dialog.Show()` in `showDialog`. On Sat, Dec 24, 2016 at 8:35 AM glenford

[go-nuts] Donating to Go/related causes

2016-12-24 Thread Kevin Burke
Hi, I started a software consultancy in July and I made a fair amount of money this year. A lot of my success was due to the Go programming language/community and I'd like to give back somehow. As far as I understand, the core Go team and the build environments etc.

[go-nuts] Re: generic "CRUD" handlers

2016-12-24 Thread Tong Sun
Wow, quite impressive. I wish I had known it earlier. One quick question, how does goa support round-robin design? I.e., from https://goa.design/learn/guide/ that I quickly peeked, it says - use goa to generate a complete implementation, including bottle.go - Then manually edit the bottle.go

[go-nuts] To watch connection lost with Go

2016-12-24 Thread Tong Sun
Hi, I'm wondering if there is ready-built lib or code that I can use to watch for connection lost, e.g., a server failed to response to ping or http request, etc. I didn't find any, so I'm wondering if it too simple or too hard. Thanks -- You received this message because you are

[go-nuts] Re: Gomobile: Getting errors when trying to build reverse example

2016-12-24 Thread glenford williams
thanks that worked. the basic example works but i tried modifying to show a dialog but got error /home/kingwill101/go/bin/gomobile: loadExportData failed go install -pkgdir= /home/kingwill101/go/pkg/gomobile/pkg_android_386 -tags="" -gcflags=-shared -ldflags=-shared

[go-nuts] Gomobile: Getting errors when trying to build reverse example

2016-12-24 Thread Elias Naur
It seems your gobind command is out of date. Update it and gomobile with go install golang.org/x/mobile/cmd/... - elias -- 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