Re: [go-nuts] Re: How to load plugin in plugin?

2017-10-08 Thread Nzlov
Thank you. On Monday, October 9, 2017 at 1:42:24 PM UTC+8, Ian Lance Taylor wrote: > > On Sun, Oct 8, 2017 at 10:30 PM, Nzlov > wrote: > > I want load a plugin `modles.so` in other a plugin `plugin.so` , build > > `modles.so` is ok , but build `plugin.so` has error , not

Re: [go-nuts] Re: How to load plugin in plugin?

2017-10-08 Thread Ian Lance Taylor
On Sun, Oct 8, 2017 at 10:30 PM, Nzlov wrote: > I want load a plugin `modles.so` in other a plugin `plugin.so` , build > `modles.so` is ok , but build `plugin.so` has error , not defined > `main.main`, but i have added `func main() {}` into `plugin.go`,like demo You are right.

Re: [go-nuts] Re: How to load plugin in plugin?

2017-10-08 Thread Nzlov
I want load a plugin `modles.so` in other a plugin `plugin.so` , build `modles.so` is ok , but build `plugin.so` has error , not defined `main.main`, but i have added `func main() {}` into `plugin.go`,like demo On Monday, October 9, 2017 at 1:16:59 PM

Re: [go-nuts] Re: How to load plugin in plugin?

2017-10-08 Thread Ian Lance Taylor
On Sun, Oct 8, 2017 at 6:30 PM, Nzlov wrote: > > But I have added `main.main` > > On Sunday, October 8, 2017 at 10:15:41 PM UTC+8, Nzlov wrote: >> >> How to load plugin in plugin? I make a demo , but build plugin has runtime >> error... >> runtime.main_main·f: relocation target

[go-nuts] request for feedback: channels for JavaScript

2017-10-08 Thread david
Hi, Inspired by Go's channels I just created a port for JavaScript. My aim was to make it idiomatic while keeping it faithful to how channels are used in Go. I'd love it if any JavaScript users would check it out and give me some feedback. https://github.com/NodeGuy/channel Thanks, David

[go-nuts] Re: How to load plugin in plugin?

2017-10-08 Thread Nzlov
But I have added `main.main` On Sunday, October 8, 2017 at 10:15:41 PM UTC+8, Nzlov wrote: > > How to load plugin in plugin? I make a demo > , but build plugin has runtime > error... > runtime.main_main·f: relocation target main.main not defined >

[go-nuts] Re: [golang-dev] How to load plugin in plugin?

2017-10-08 Thread Nzlov
Sorry,please help me. On Sunday, October 8, 2017 at 10:47:46 PM UTC+8, Ralph Corderoy wrote: > > Hi Nzlov, > > > How to load plugin in plugin? > > You've emailed the wrong list. :-) > To talk to users of the Go programming language you want Go Nuts. > See the guidance at the start of

[go-nuts] [ANN] roger, an app configuration library experiment

2017-10-08 Thread Alex Buchanan
My weekend project for that past couple weeks has been roger: https://github.com/buchanae/roger This is another take on application configuration management: flags, env vars, YAML, etc. The core ideas are: - define config as structs - defaults are defined by functions which return instances of

[go-nuts] Re: Variable scope for text/template

2017-10-08 Thread bep
https://github.com/golang/go/issues/10608 bep fredag 6. oktober 2017 07.22.49 UTC+2 skrev Hein Meling følgende: > > Hi all, > > Please see linked example code. I've been trying set a "global" variable > ($LastName in the example) for use inside a named template (phony in the > example), but

Re: [go-nuts] Re: Why is there a slow-down to split one method of a struct pointer into two methods?

2017-10-08 Thread Jan Mercl
On Sun, Oct 8, 2017 at 8:02 PM Zack Scholl wrote: > Why does it slow down the code if its not inlined? Since the method is on a pointer struct I assume it wouldn't need to copy anything? Call/return is not free even before stack limit checking, pushing the arguments and

[go-nuts] Re: Why is there a slow-down to split one method of a struct pointer into two methods?

2017-10-08 Thread Zack Scholl
Why does it slow down the code if its not inlined? Since the method is on a pointer struct I assume it wouldn't need to copy anything? I'd like to not use inlining because I need the code of this function to be used by two different functions and would rather not have to update the code twice

[go-nuts] Re: [golang-dev] How to load plugin in plugin?

2017-10-08 Thread Ralph Corderoy
Hi Nzlov, > How to load plugin in plugin? You've emailed the wrong list. :-) To talk to users of the Go programming language you want Go Nuts. See the guidance at the start of https://golang.org/help/ -- Cheers, Ralph. https://plus.google.com/+RalphCorderoy -- You received this message

[go-nuts] Re: go doc for private github repositories

2017-10-08 Thread prateek papriwal
Try out https://rocro.com/docstand. You can simply signin (https://docstand.rocro.com/signin) and register your private repository. And then whenever you push new commits to your repo, your documentation is updated (continuous documentation). On Saturday, 25 January 2014 05:32:58 UTC+9, Tim

[go-nuts] How to load plugin in plugin?

2017-10-08 Thread Nzlov
How to load plugin in plugin? I make a demo , but build plugin has runtime error... runtime.main_main·f: relocation target main.main not defined runtime.main_main·f: undefined: "main.main" -- You received this message because you are subscribed to the

[go-nuts] Re: Why is there a slow-down to split one method of a struct pointer into two methods?

2017-10-08 Thread as
Take the loop and put it inside the function call. Don't make function calls in the body of a hot loop, take advantage of the loop optimizations in the runtime and your cpu cache. On Sunday, October 8, 2017 at 3:57:04 AM UTC-7, Zack Scholl wrote: > > Why is it that when I a method on an struct

[go-nuts] Re: Why is there a slow-down to split one method of a struct pointer into two methods?

2017-10-08 Thread Uli Kunitz
A function call per input byte will slow your code down unless the function is inlined. The for loop is quite simple so I wonder why you want to separate it. You should also think about whether you want to replace the process method by a Write method, making your object an io.Writer and much

[go-nuts] Why is there a slow-down to split one method of a struct pointer into two methods?

2017-10-08 Thread zack . scholl
Why is it that when I a method on an struct pointer, like func (s *Object) process(inputs []byte) { for _, i := range inputs { // Lots of code } } it will slow down *a lot* if I move // Lots of code to its own function? I.e. I reorganize the above program two use two