Re: [go-nuts] Address of function

2020-04-14 Thread Viktor Ogeman
Thanks Sent from my phone > On 14 Apr 2020, at 15:34, Michał Łowicki wrote: > >  > Please take a look at one of old threads about it - > https://groups.google.com/forum/#!topic/golang-nuts/reaIlFdibWU. > >> On Tue, Apr 14, 2020 at 12:50 PM wrote: >> Hi, >> >> What is the reason for not al

[go-nuts] Address of function

2020-04-14 Thread viktor . ogeman
Hi, What is the reason for not allowing taking the address of a function return value, ie having to assign it to a variable first? See https://play.golang.org/p/rjLwiVmikMc Regards -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscri

Re: [go-nuts] Setting font in draw2d

2018-09-11 Thread viktor . ogeman
Thanks, I Will give that packade a try instead. -- 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

[go-nuts] Setting font in draw2d

2018-09-11 Thread viktor . ogeman
Hi, I am struggling to load and use custom fonts from ttf files in draw2d (used since I need rotated text). To illustrate: https://play.golang.org/p/6-rswetZOr8 give the output: 2018/09/11 15:52:43 open ../resource/font/luxisr.ttf: no such file or directory It seems as if GraphicsContext.SetFo

[go-nuts] buildmode=plugin and pprof

2018-03-30 Thread viktor . ogeman
Hi, Does anyone know if profiling is supposed to work for an application using plugins or not (i find no information that it shouldn't)? Background: 1. My package test works fine (including loading a plugin), showing no errors in normal test. 2. When running the test under -race the only outpu

Re: [go-nuts] Understanding method pointers

2017-12-09 Thread viktor . ogeman
Thanks for this explanation, it does make sense (in particular you unsafe example showing that they are different pointers) technically. It thus confirms that I am using method pointers in a "supported" by passing them around (in an interface) and expecting them to operate on their original st

Re: [go-nuts] Understanding method pointers

2017-12-09 Thread viktor . ogeman
Sorry about the unclear code, that was just a consequence of simplifying down from the actual use-case, however, to me it seems not to be the same thing. In your example you have one struct and capture a method on that same struct twice, refering to the same - that makes sense. However, in my

Re: [go-nuts] Understanding method pointers

2017-12-09 Thread viktor . ogeman
Hi, Thanks for the tips, no, I have checked so that all the methods are on pointers so thats not it unfortunately. I do now fully undertand you explanation for why I see the same adress being printed for both actions[1] and actions[2] though? In the playground example they are being called as

[go-nuts] Understanding method pointers

2017-12-09 Thread viktor . ogeman
Hi, I have a problem that I have tried to reduce to a minimal re-producible example, I have not fully managed but it does show some to me strange behavior: https://play.golang.org/p/ZCyumUPBos I have a similar set up in a much larger set-up where I seem to see (no errors reported by race