> I’d have thought the case would be the same with the AGPL.
https://opensource.google.com/docs/using/agpl-policy/
--
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
t
In short, your concurrency is too fine-grained. Adding concurrency
primitives requires locking which is expensive, and creating a lot of
goroutines does consume resources, even if we consider it relatively
cheap.
If you slice the problem slightly differently it can be made faster:
one goroutine pe
If you're looking for general examples of modern Go, perhaps the
JustForFunc series will be of interest:
https://www.youtube.com/channel/UC_BzFbxG2za3bp5NRRRXJSw
On Fri, Apr 13, 2018 at 10:28 AM, JM wrote:
> thanks. I run a software engineering team so I've been less hands-on lately
> and want t
Due to Go's compatibility promise most example code written since Go
1.0 should still be relevant, will compile, and will run. Libraries
have grown since 1.0 as our understanding of how to write Go code
improves (context.Context is one such innovation), but the examples in
the documentation are kep
but when it reaches:
>
> body, err := ioutil.ReadAll(reader)
>
> if the reader is gzip.Reader - it throws an error: "unexpected EOF"
>
>
>
> On Thu, Apr 12, 2018 at 10:45 PM andrey mirtchovski
> wrote:
>>
>> from the panic you can see that you're
from the panic you can see that you're passing to ReadAll a valid
interface (non-nil type pointer) however the interface contains a nil
object (nil value pointer):
io/ioutil.ReadAll(0x14ce020, 0x0, 0x0, 0x1a, 0xc420069cb0, 0x1, 0x1)
to understand why there are more arguments than you expect in th
> ah, it's all (i think) clear now. so, based on what i see under
> ${GOROOT}/src/hash, i could do any or all of the following:
>
> import "hash"
> import "hash/adler32"
> import "hash/crc32"
> import "hash/crc64"
> import "hash/fnv"
note that you don't need to import "hash" unless you
The easiest way to avoid this is to make the channel buffered with
enough room to consume all responses. Only the first one will be read,
but the rest will be garbage collected.
c := make(chan Result, len(replicas))
should be enough.
On Wed, Apr 4, 2018 at 4:20 AM, wilby yang wrote:
> I am new
this is https://github.com/golang/go/issues/8005, i believe.
On Mon, Apr 2, 2018 at 5:37 PM, Andrew Pennebaker
wrote:
> Some Go types like sync.Mutex have a subtle API issue, where the objects
> really shouldn't be copied or passed around into different function calls,
> e.g. to a goroutine worke
Thanks for your help. I think I understood the problem I was having.
In the original code (not the example in this email) things that would
normally go to a CHOICE field were marshalled into a RawValue, which
then got switched on RawValue.Tag to decide where to go (it's part of
the protocol, unrela
I have a piece of valid asn.1 that i'm not able to properly parse with
Go's encoding/asn.1. I have distilled the example down to:
https://play.golang.org/p/YQCVxhEKnJx
the asn1 code, which i generated with asn1c, is parseable by asn1c and
lapo.it: http://lapo.it/asn1js/#A010A106800101810102A20680
Is this what you're referring to? It's on tip.golang.org (don't see it
on golang.org):
https://i.imgur.com/vrPD0UC.png
for me the order does not change, but that can be an artefact of caching.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To
the backslash character means something within double quotes. either
escape it ("\S" becomes "\\S") or use backquotes (`\S`)
On Thu, Mar 22, 2018 at 4:33 PM, Tong Sun wrote:
> I'm trying with simple Perl character class regular expression, which should
> be supported by Go (link).
>
> However, I'
wanted: panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1090432]
got: ** Signal 11 from untrusted code: pc=6559000898c0
is this just an idiosyncrasy of the playground, or am I breaking something?
--
You rece
it deadlocks because you're not reading all the data. Read() may
return "up to len(p)", but not necessarily the whole thing. the reader
should loop until it reads all available bytes in your case you know
how many bytes you are going to write beforehand.
if you do not ignore the first value return
the answer is hidden in the spec, i believe (it's not easy to parse,
so i suggest reading the whole thing):
"The right operand in a shift expression must have unsigned integer
type or be an untyped constant representableby a value of type uint.
If the left operand of a non-constant shift expressio
maybe this will give you a hint: https://play.golang.org/p/ANIjc3tCdwp
maps are reference types, but they still get passed by value. if you
pass a nil map around, the old value you passed will not magically
start pointing to a new map once you instantiate it elsewhere.
--
You received this messa
Thanks. This will give me a chance to check the new GitHub PR process:
https://github.com/golang/go/pull/24255
On Mon, Mar 5, 2018 at 11:40 AM, Ian Lance Taylor wrote:
> On Mon, Mar 5, 2018 at 10:10 AM, andrey mirtchovski
> wrote:
>>
>> I finally found some time to work on
> var testuser string = string(user.Username)
you don't need the conversion. user.Username is already a string.
--
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
You have a variable of type *user.User. The documentation
(https://golang.org/pkg/os/user/#User) says there is a field on that
type called "Username". To get the username of a user you should
therefore use username.Username (but that's too stuttery, perhaps "u,
err := user.Current()" and then use u
On Tue, Feb 6, 2018 at 4:20 PM, Ian Lance Taylor wrote:
> On Tue, Feb 6, 2018 at 2:54 PM, andrey mirtchovski
> wrote:
>> $ go test -c os/signal
>> $ ./signal.test
>> PASS
>> $ go tool dist test -v
>>
>> # Testing packages.
>> # go tool dist test
Use 'go build -gcflags="-m"' to see what inlining actions the compiler
takes. more here:
https://github.com/golang/go/wiki/CompilerOptimizations#escape-analysis-and-inlining
for example this https://play.golang.org/p/QyAauePKbn- will result in:
$ go build -gcflags='-m' t.go
# command-line-argumen
> I don't know that. append was not in Go 1.0?
Go the language was opened to the world on Nov 10, 2009. Go 1.0 was
released 28 March 2012.
Append appeared on Oct 27, 2010:
https://github.com/golang/go/commit/d8b5d039cd1bec151cc325973ff32bd34ebb0456
--
You received this message because you are s
can you create an issue for this? we're also suffering from the same
internally. please make it about GitHub Enterprise, as that is what
they call it :)
On Thu, Feb 22, 2018 at 5:16 PM, Richard Wilkes wrote:
> Is it expected that vgo should work with enterprise GitHub servers at this
> point in t
sorry, i just realized that i said 'area' but meant 'height' in my
previous email.
On Thu, Feb 22, 2018 at 2:09 PM, andrey mirtchovski
wrote:
> in the first Printf "area" is truncated. try %.40f to see the real
> value, which is more like:
>
>
in the first Printf "area" is truncated. try %.40f to see the real
value, which is more like:
262256.4523014638689346611499786376953125
plugging that in as h2 will result in
39709429597.0098280725069344043731689453125 (according to wolfram
alpha)
On Thu, Feb 22, 2018 at 1:32 PM, wrote:
>
>
didn't reply to list, sorry:
> https://github.com/chemikadze/asn1go
i gave it a try. it's a good start (we use asn1c heavily, asn1go is a
good match for our use case) but there seems to be a lot missing.
including a license. i created an issue for that.
it failed to parse our asn.1 on some techn
t;
>> I did something like this here:
>>
>> https://github.com/brunoga/workerpool
>>
>> I do not store the context anywhere, I pass it to my Start() method and it
>> passes it down to any place I need it.
>>
>>
>> On Fri, Feb 16, 2018 at 1:05 PM
While trying to retrofit context.Context within a
worker-pool-patterned package, where work is sent down a channel to be
picked up by number of worker goroutines.
I'm running against the mantra of "Do not store Contexts inside a struct type".
For example, I want to put a timeout on the amount of
just bump the clock rate to 3ghz and you'll reduce the cgo call cost
to reasonable values :D
On Thu, Feb 15, 2018 at 11:29 AM, Dave Cheney wrote:
> cgo is not go.
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this
#cgo darwin LDFLAGS:-framework Security -framework Foundation
-framework SystemConfiguration
#cgo linux LDFLAGS:-L${SRCDIR}/../../lib -lxml2
etc.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving e
If you mix dynamic libraries with static ones in the same folder the
-L -l trick won't work. a workaround is to softlink the .a files to a
separate folder so that the linker doesn't see the .so/.dylib files.
On Fri, Feb 9, 2018 at 12:11 PM, Jason E. Aten wrote:
>> Note that the _ALLOW environment
Please add your comments to this issue:
https://github.com/golang/go/issues/23749 There are already a couple
of reports for that particular usage pattern, one of which is mine.
For now you have the option to do:
#cgo LDFLAGS: -L${SRCDIR}/../../../LuaJIT/LuaJIT/src -lluajit -lm -ldl
There are othe
$ go test -c os/signal
$ ./signal.test
PASS
$ go tool dist test -v
# Testing packages.
# go tool dist test -run=^go_test:archive/tar$
[...]
ok net/url (cached)
ok os 0.677s
ok os/exec 1.414s
--- FAIL: TestTerminalSignal (5.01s)
signal_cgo_test.go:138: "PS1='prompt> '\r\n"
signal_cgo_test.go
I'm trying to understand why os/signal tests fail on my 10.12 macbook
pro at tip:
$ ./all.bash
[...]
ok net/textproto (cached)
ok net/url (cached)
ok os 0.678s
ok os/exec 1.185s
--- FAIL: TestTerminalSignal (5.01s)
signal_cgo_test.go:138: "PS1='prompt> '\r\n"
signal_cgo_test.go:163: timed out
on the Go side you have an array of bytes, on the C side you are
passing a pointer to an array of shorts (16-bits)
--
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
in the spec i have something defined as:
Inner ::= [10] IMPLICIT SEQUENCE {
one INTEGER,
two INTEGER
}
Outer :== [11] IMPLICIT SEQUENCE {
one Inner,
two INTEGER
...
}
what are my options for tagging the "Inner" struct? do I need to
specify the tag (10) in each instan
Having an option to link to old docs on golang.org (say
golang.org/pkg/something?tag=1.6.0) will result in people linking to
that option, crawlers storing that option, search engines pointing to
that option, and articles, help information and whatever else online
pinning themselves to that option.
> so go compiler generate what?!
https://golang.org/cmd/compile/
Compile, typically invoked as “go tool compile,” compiles a single Go
package comprising the files named on the command line. It then writes
a single object file named for the basename of the first source file
with a .o suffix. The
> Last Version of Go Compiler doing Generate `ASM Code` and next Linker... and
> make final binary output file for they platform?
The modern Go compilers (https://golang.org/cmd/compile/, gccgo) do
not generate "ASM Code" unless an appropriate flag is presented to
them. For the "compile" tool (go
> Why not Use?!
The Go team felt LLVM was too large and slow to meet their performance goals.
--
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+unsubsc
> FireFox actually uses Yahoo --- not Google --- so if Google did make a
> donation to Mozilla, they got nothing in return.
> You're not supposed to expect something in return when you make a donation
> to a non-profit --- donations are not supposed to be a business deal.
this is highly offtopic,
Erik, any chance you're hitting this?
https://github.com/golang/go/issues/20427
Related article discussing bad ram:
https://marcan.st/2017/12/debugging-an-evil-go-runtime-bug/
On Mon, Dec 4, 2017, 5:35 PM 'Keith Randall' via golang-nuts <
golang-nuts@googlegroups.com> wrote:
> package main
>
>
> Recently I encountered a crash in the latest stable version of Go that
> blocked my development and was root caused to a mistake in how pointers are
> handled as map keys by the runtime.
can you share this bug? perhaps by making it more visible we can, as a
team, solve any nascent dependancies o
">" is a special character interpreted by your shell.
On Sun, Nov 12, 2017 at 8:35 PM, wrote:
> package main
>
> import(
> "fmt"
> "os/exec"
> )
>
> func main ()
> cmd := exec.Command("ls", ">", "/dev/null")
> output, err := cmd.CombinedOutput()
> if err != nil {
> fmt.Println(fmt.Sprint(err) +
> Is there anything in the Go docs that indicates that?
https://tip.golang.org/pkg/hash/#Hash
(from https://go-review.googlesource.com/c/go/+/66710)
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receivi
>
> Seems time is on our side.
>
yes it is.
--
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.
For more options, visit htt
It's in the spec under constants: arithmetic has arbitrary precision. When
you restrict to a floating point type by assigning to a variable you also
restrict the precision of the result.
On Thu, Nov 9, 2017, 4:35 PM wrote:
> Why are the following unequal in Go? Is this a bug, or is it by design?
See the section "For statements with range clause" in the spec:
https://golang.org/ref/spec#For_statements
"For a string value, the "range" clause iterates over the Unicode code
points in the string starting at byte index 0. On successive
iterations, the index value will be the index of the first
Thanks, this helped and worked right off the bat.
--
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.
For more options, visi
Is there any way, an option or an argument, that would allow me to
unwind the stack on the CGO side of a profile better? Right now I'm
looking at stacks that unwind only the top function, see example. This
happens on both linux and macOS.
My other option is to link gperftools into the go binary, b
I don't have answers to your questions, but wanted to say "kudos" for
the translation!
andrey
On Sun, Sep 24, 2017 at 8:40 AM, Krasimir Berov wrote:
>
> Hello all,
> Some time ago I started translating "A tour of Go" to Bulgarian - "Разходка
> в Go".
> The source code is here: https://github.com
> Have you tried with gofmt 1.9 locally before posting?
of course. that is what i showed in the original post:
$ go version
go version go1.9 darwin/amd64
$ gofmt t.go
package main
import (
"fmt"
)
type myint = int
func main() {
var ii myint = 5
fmt.Println("Hello, playground#", ii)
occam's razor: most likely the playground is running an old gofmt.
$ gofmt t.go
package main
import (
"fmt"
)
type myint = int
func main() {
var ii myint = 5
fmt.Println("Hello, playground#", ii)
}
$ ~/go1.4/bin/gofmt t.go
t.go:7:12: expected type, found '='
...
On Tue, Aug 29, 201
;t look carefully enough?
>
> On Friday, August 25, 2017 at 12:32:25 PM UTC-4, andrey mirtchovski wrote:
>>
>> There's svgo: https://github.com/ajstarks/svgo
>>
>> When in doubt, put your code out there :)
>>
> --
> You received this message beca
There's svgo: https://github.com/ajstarks/svgo
When in doubt, put your code out there :)
On Fri, Aug 25, 2017 at 9:37 AM, wrote:
> I've been experimenting with Go recently, having been more of a Python
> programmer.
> As an exercise, I've written a Go program that creates simple SVG xml based
>
It's not immediately obvious what you're trying to do, but here's one
possible solution: https://play.golang.org/p/wrrDlvDISq
On Tue, Aug 22, 2017 at 8:38 AM, Tong Sun wrote:
> Hi,
>
> How to initialize a go struct like the following?
>
> type Server struct {
> Namestring
> ID int32
>
t. Makes sense
>> now. Learned a lot too...
>>
>> Thank you very much I really appreciate it... It already took me more than
>> a week. My first time working on this. I do not know how long it would have
>> taken me without your help.
>>
>> Thanks a lo
> What do you use to read documentation when you are offline?
godoc -http=:6060
--
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...@googlegro
the example you have given is incomplete, but the most likely reason
you're not being successful is that you are not setting correctly
headers for multipart/mixed mime types. i've created a full working
example here, hopefully this helps:
https://play.golang.org/p/xVqUDN7OGt
for more info on mult
the code below which gzips and attaches a file to an email io.Writer
has worked for me for close to 5 years. it's not idiomatic go code so
don't use it verbatim, only as an example.
the boundary is something random the client chooses. i use a sha256
baked into the client. the same for every attach
> Then how about this?
No.
--
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.
For more options, visit https://groups.googl
can you show us a complete example with a stub C function? in
particular the conversion to (*C.char) from unsafe.Pointer(&data[0])
should work. compare the first four bits at that address with the
first four bits you're receiving on the C side. they should be
identical. e.g.: https://play.golang.or
I found it: I had a typo writing "C.nil" instead of "nil". thanks for your help!
On Sun, Jun 11, 2017 at 9:31 PM, Ian Lance Taylor wrote:
> On Sun, Jun 11, 2017 at 7:56 PM, andrey mirtchovski
> wrote:
>>
>> I have a piece of cgo code which doesn't do m
I have a piece of cgo code which doesn't do much, but links a lot of
libraries in. As far as I can tell all my includes are there and they
shouldn't stomp on each other (they don't when compiled in C), however
with cgo I get the following weirdness:
$ go build
# mypkg
Undefined symbols for archite
+ all
> the pointer with the finalizer set on it is no longer referenced and the
> finalizer is eligible to be run when the next GC occurs.
should this constitute an error that requires a panic, or is this not
panic-ing due to unsafe/cgo being in use?
--
You received this message because you a
macOS wants to do absolutely everything through their own dylib. it's
a way of keeping control of their ecosystem. they've gone to the
extent of disallowing you to compile statically linked binaries with
their libc. windows is a much more convenient beast in that respect.
On Sun, May 14, 2017 at 4
Perhaps looking at the history of the implementation will shed some light:
https://github.com/golang/go/commit/01389b966ed81fad6e5fac3e98fe46e162645659
On Sat, May 13, 2017 at 6:28 AM, Keith Brown wrote:
> I am learning basic data structures and I chose golang since it provide C
> like pointer
On Tue, May 2, 2017 at 10:39 AM, wrote:
> - Hey, boss, I want to show a novelty. It's called AUTOMOBILE.
> - Go ahead.
> - It can carry you to any place you want.
> - My horse can carry me to any place I want as well. So what?
> - No, I mean, an automobile is much more confortable.
> - Have you r
> amazing, Thank you for that detailed breakdown!
when one does something for a long time and understands the system
well they develop an intuition for where the problems may lie. this is
true in every profession...
--
You received this message because you are subscribed to the Google Groups
"g
as a first approximation, if you have debug symbols for everything,
you can use 'nm' and filter out the Go dependencies which normally do
not start with underscore:
$ nm `which go` | awk '{print $3}' | sed -n '/^_/p'
[snip]
__cgo_62033c69288a_Cfunc_CFDataGetBytePtr
__cgo_62033c69288a_Cfunc_CFDataG
> 297 for i := n - 1; i > 0; i-- {
"i > 0" is cheaper than "i < n" on some processors :)
On Thu, Apr 20, 2017 at 3:14 AM, wrote:
> Hi
>
> At the moment it is implemented as
>
>295func IsSorted(data Interface) bool {
>296n := data.Len()
>297fo
I usually create a separate struct for each part of the union and
provide interface methods for un/marshalling. It is more work, but I
find it to be much cleaner in the end: once those are created the
union doesn't "leak" into the go code.
On Tue, Apr 18, 2017 at 8:41 AM, Vasiliy Tolstov wrote:
>
o.git: unrecognized import path
"g...@github.com:user/foo.git" (https fetch: Get
https://g...@github.com:user/foo.git?go-get=1: invalid URL port "user")
On Tue, Mar 21, 2017 at 9:52 AM, Jan Mercl <0xj...@gmail.com> wrote:
>
> On Tue, Mar 21, 2017 at 4:44 PM andrey mirtc
i'm trying to clone a repo from github enterprise. i've followed the
instructions i could find and set up the following gitconfig:
[url "git@1.2.3.4:"]
insteadOf = ssh://git@1.2.3.4/
however i can't get past the vanity import check, instead getting:
unrecognized import path "git@1.2.3.4:/use
the first question i usually ask is "what's the name of the gopher" :)
On Sun, Mar 5, 2017 at 10:50 AM, Nyah Check wrote:
> Hi Gophers,
>
> I am an entry SE and I'm to interview someone to join our Golang Backend
> team. I've told them I'm not experienced enough and they refused. Can anyone
> ple
You can try binary.Size but you'll also run into the same problem:
int's size is platform specific (binary.Size returns -1 for ints). As
the go faq states "For portability, code that relies on a particular
size of value should use an explicitly sized type, like int64."
--
You received this messag
If I may add: undetected race conditions are also a problem.
--
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.
For more op
> Maybe you could use “notwithstanding". It’s an ignored token in the default
> Go compiler, and a weak pointer is one that allows an object to be freed
> notwithstanding any weak references to it…
these are gone now: https://twitter.com/rob_pike/status/808784925402898432
--
You received this
your program never completes, pprof.StopCPUProfile() has no chance of
being called.
On Tue, Feb 7, 2017 at 2:55 PM, Jason E. Aten wrote:
> How does one reliably obtain a cpu profile written to file? I tried
> following the instructions in runtime/pprof.go, but the profile file is most
> always e
I think the original asked for what exactly is bugging you about the
font, not a general statement that somebody somewhere doesn't like it
with a link to a broad discussion on the subject of programming fonts.
Do you have anything that bothers you about them, maybe in
relationship with the list of
I bet you get wildly differing results with each run. That's an
indicator that your sample size is not statistically relevant (there's
randomness introduced both in the select, as well as in the OS and Go
schedulers).
Increase the iterations until your results stabilize, then you'll see
what the r
has ruined the frames. I'll try another gif tomorrow.
>
> On Saturday, 21 January 2017 16:57:15 UTC, andrey mirtchovski wrote:
>>
>> I see only a single frame in your source file. I ran your program on
>> another gif and got the expected result:
>>
>> http://i.img
I see only a single frame in your source file. I ran your program on
another gif and got the expected result:
http://i.imgur.com/HOnlU1q.gif
http://i.imgur.com/GnSUHQ1.gif
On Sat, Jan 21, 2017 at 8:54 AM, kalekold via golang-nuts
wrote:
> Hi,
>
> I'm trying to draw some text on an animated gif a
it would've been sufficient to print out "currDur" and see that it
goes negative after a while
On Wed, Jan 11, 2017 at 12:57 PM, Art Mellor
wrote:
> Thanks! I never would have found that.
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> T
You've hit the problem already but resolved it the wrong way in your
code on line 23. The compiler didn't allow you to multiply an int by
time.Duration (int64) but unfortunately you resolved to convert the
time.Duration to an int instead of the other way around. On 32-bit
architectures ints are not
> Sorry, I don't understand what you mean by the textual Plan 9 font file.
do $ 9p read 'font/Go Mono/11/font' instead. the second line should
point to the glyph file for runes 0x0 to 0xff, something like:
0x 0x00ff x.bit
--
You received this message because you are subscribed to the Go
> It’s also about 2x slower than the original Python. All of this indirection
> is necessary to preserve the dynamic semantics of Python. Basically it’s
> taking the calls into the runtime that a Python interpreter would make, and
> writing them out one after another.
this single-thread slowdow
I am attaching a simple reproduction of the package name crash (using
reverse.go). There is no need to modify the android manifest file for this
to trigger. The error I see is given below.
I'm also attaching a proposed fix for the renaming clash which works for my
case. I can submit it as a CL or
here is the diff for reproducing the JNI issue (I sent the previous
email without it). my guess is that "context" needs to be resolved to
the java side for this to work:
$ git diff .
diff --git a/example/reverse/reverse/reverse.go
b/example/reverse/reverse/reverse.go
index c4c3377..4ccf1e7 100644
Elias Naur wrote:
> Hi,
>
> Can I persuade you to send a complete example that demonstrates the
> package name clash problem and one that demonstrates the runtime JNI crash?
> Thanks.
>
> - elias
>
>
> On Saturday, December 24, 2016 at 11:27:56 PM UTC+1, andrey mirt
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", how
> 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
sugg
My apologies to the original author, but the "state of the art" of
modern garbage collectors is not acceptable if it means this:
"To run dex in process, the Gradle daemon needs a larger heap.
It currently has 1024 MB.
For faster builds, increase the maximum heap size for the Gradle
dae
The main activity in the reverse example uses a
support/v7/app.AppCompatActivity (as it should), however if I want to add
an app.Service service to the android app gomobile encounters duplicate
import errors:
gomobile_bind/go_appmain.go:20: app redeclared as imported package name
If I attempt
Nevermind, found the missing piece with a bit more documentation-reading:
SetClassName_Ljava_lang_String_2Ljava_lang_String_2
--
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, s
I'm trying to create a long-running service from Go by calling
startService with an intent. I can't see how to create an intent with
a Class from Go, so I want to do the second best thing, use
setClassName*:
intent := Intent.New()
intent.SetClassName("package", "service")
context.Start
it's also possible that you need to do "go build -i" just in case your
dependencies are outdated. i had the same issue today with a windows
piece of code that rebuilt sqlite3 every time.
On Wed, Dec 7, 2016 at 2:57 PM, Dave Cheney wrote:
> Docker add, or whatever is pushing files into your conta
Thanks, this works perfectly!
On Mon, Dec 5, 2016 at 3:33 AM, Elias Naur wrote:
>
> On Monday, December 5, 2016 at 7:44:23 AM UTC+1, andrey mirtchovski wrote:
>>
>> I'm having issues with the latest gomobile + reverse java bindings. I
>> have a piece of code that li
I'm having issues with the latest gomobile + reverse java bindings. I
have a piece of code that linked with a C library via CGO. Previously
(around 6 months ago) everything appeared file: cross compile library
with NDK toolchain (gcc), link against go code with cgo, run "gomobile
bind -target=andro
101 - 200 of 228 matches
Mail list logo