Re: [go-nuts] Is it acceptable to make the optional parameter as varargs

2020-05-24 Thread robert engels
I think the Builder pattern is easier than this, and it retains the property of 
both ‘config struct’ and ‘multiple args’ versions that the implementation can 
re-order and validate option in aggregate easier - but most of all is doesn’t 
pollute that package with top-level public functions. The builder pattern uses 
instance methods to tie the function to the configuration structure,

> On May 24, 2020, at 11:36 PM, Amarjeet Anand  
> wrote:
> 
> Thanks James for your response and the amazing posts.
> 
> On Mon, May 25, 2020 at 9:01 AM James  > wrote:
> This reminds me of functional options which I think are used quite widely for 
> this purpose.
> 
> See https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis 
>  and 
> https://github.com/tmrts/go-patterns/blob/master/idiom/functional-options.md 
> 
> On Mon, 25 May 2020 at 14:57, Amarjeet Anand  > wrote:
> Is it acceptable to make the optional parameter as varargs?
> I wrote code in my package like ...
> 
> 
> package backoff
> 
> func New(options ...Options) *backOff {
>backOff := defaultBackOff()
>if len(options) == 0 {
>   return backOff
>}
> 
>// override default values
>if len(options) > 1 {
>   panic("only 1 backOffOption allowed")
>}
>optn := options[0]
>backOff.options = 
> 
>if optn.Delay_ms > 0 {
>   backOff.delay_ms = optn.Delay_ms
>}
>return backOff
> }
> 
> 
> So that in other package, it can be used as backoff.New() when option is not 
> needed(which will be the case most of the time).
> 
> Is using varargs for optional parameter is ok? Or am I abusing the Variadic 
> Functions feature?
> 
> 
> 
> 
> 
> 
> -- 
> 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 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/CANFuhy8nhhbBDWb0%3D7SLvq1aictC9GVG%3D9zpfpJ1gevDdRmd6A%40mail.gmail.com
>  
> .
> 
> -- 
> 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 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/CANFuhy9Aj%2Bo7M-%3Dstro5aXbjPTnCZ0y_4vYE3CAjDiBpCUhjpw%40mail.gmail.com
>  
> .

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/67D5D073-044A-4274-9DF4-EE786F08AD65%40ix.netcom.com.


Re: [go-nuts] Re: Need help with go modules

2020-05-24 Thread Jan Mercl
On Sun, May 24, 2020 at 6:58 AM Henry  wrote:
> To create a Go Module, step inside your project folder, and type go mod init 
>  where  is the qualified name of your project. For 
> instance, if you want to call your project "github.com/henry/myproject", then 
> inside your myproject folder, type go mod init github.com/henry/myproject

s//import path/. Namespaces as well as "qualified name of
your project" have no definition in the specs. Import path has:
https://golang.org/ref/spec#Import_declarations

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAA40n-VBGdXanPH0kcssShgfbc-eHBjDgZLUUJoDunzYCZEnVA%40mail.gmail.com.


Re: [go-nuts] Is it acceptable to make the optional parameter as varargs

2020-05-24 Thread Amarjeet Anand
Thanks James for your response and the amazing posts.

On Mon, May 25, 2020 at 9:01 AM James  wrote:

> This reminds me of functional options which I think are used quite widely
> for this purpose.
>
> See
> https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis
>  and
> https://github.com/tmrts/go-patterns/blob/master/idiom/functional-options.md
>
> On Mon, 25 May 2020 at 14:57, Amarjeet Anand 
> wrote:
>
>> Is it acceptable to make the optional parameter as varargs?
>> I wrote code in my package like ...
>>
>>
>> package backoff
>>
>> func New(options ...Options) *backOff {
>>backOff := defaultBackOff()
>>if len(options) == 0 {
>>   return backOff
>>}
>>
>>// override default values
>>if len(options) > 1 {
>>   panic("only 1 backOffOption allowed")
>>}
>>optn := options[0]
>>backOff.options = 
>>
>>if optn.Delay_ms > 0 {
>>   backOff.delay_ms = optn.Delay_ms
>>}
>>return backOff
>> }
>>
>>
>>
>> So that in other package, it can be used as *backoff.New()* when option
>> is not needed(*which will be the case most of the time*).
>>
>> Is using varargs for optional parameter is ok? Or am I abusing the
>> Variadic Functions feature?
>>
>>
>>
>>
>>
>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/golang-nuts/CANFuhy8nhhbBDWb0%3D7SLvq1aictC9GVG%3D9zpfpJ1gevDdRmd6A%40mail.gmail.com
>> 
>> .
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CANFuhy9Aj%2Bo7M-%3Dstro5aXbjPTnCZ0y_4vYE3CAjDiBpCUhjpw%40mail.gmail.com.


[go-nuts] time.Ticker's behavior

2020-05-24 Thread Kai Zhang
Hello,
  I'm using ticker to do some batch works.But I found why tickers runs 
not as expect.why the second ticker is 100 Millisecond.code is here 

thanks,
zhangkai
2020-05-25

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/13611eb0-d229-4ca2-9abc-4e5dcf2bc1c1%40googlegroups.com.


Re: [go-nuts] Is it acceptable to make the optional parameter as varargs

2020-05-24 Thread James
This reminds me of functional options which I think are used quite widely
for this purpose.

See https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis
 and
https://github.com/tmrts/go-patterns/blob/master/idiom/functional-options.md

On Mon, 25 May 2020 at 14:57, Amarjeet Anand 
wrote:

> Is it acceptable to make the optional parameter as varargs?
> I wrote code in my package like ...
>
>
> package backoff
>
> func New(options ...Options) *backOff {
>backOff := defaultBackOff()
>if len(options) == 0 {
>   return backOff
>}
>
>// override default values
>if len(options) > 1 {
>   panic("only 1 backOffOption allowed")
>}
>optn := options[0]
>backOff.options = 
>
>if optn.Delay_ms > 0 {
>   backOff.delay_ms = optn.Delay_ms
>}
>return backOff
> }
>
>
>
> So that in other package, it can be used as *backoff.New()* when option
> is not needed(*which will be the case most of the time*).
>
> Is using varargs for optional parameter is ok? Or am I abusing the
> Variadic Functions feature?
>
>
>
>
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/CANFuhy8nhhbBDWb0%3D7SLvq1aictC9GVG%3D9zpfpJ1gevDdRmd6A%40mail.gmail.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAFuMYUwW2DCw4Ks9Ho94LKtwLDpf%2B7YMkrMT1hNss5murmcsHw%40mail.gmail.com.


[go-nuts] Is it acceptable to make the optional parameter as varargs

2020-05-24 Thread Amarjeet Anand
Is it acceptable to make the optional parameter as varargs?
I wrote code in my package like ...


package backoff

func New(options ...Options) *backOff {
   backOff := defaultBackOff()
   if len(options) == 0 {
  return backOff
   }

   // override default values
   if len(options) > 1 {
  panic("only 1 backOffOption allowed")
   }
   optn := options[0]
   backOff.options = 

   if optn.Delay_ms > 0 {
  backOff.delay_ms = optn.Delay_ms
   }
   return backOff
}



So that in other package, it can be used as *backoff.New()* when option is
not needed(*which will be the case most of the time*).

Is using varargs for optional parameter is ok? Or am I abusing the Variadic
Functions feature?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CANFuhy8nhhbBDWb0%3D7SLvq1aictC9GVG%3D9zpfpJ1gevDdRmd6A%40mail.gmail.com.


[go-nuts] Re: Is there a way to create a global variable inside go routine stack? so that i can access any time, without passing around between methods/functions. Crazy thought !!!..

2020-05-24 Thread tokers
You may try to inspect this go package: https://github.com/jtolio/gls

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/6cb0288c-8dda-4b24-82ca-d41c28b7ddca%40googlegroups.com.


Re: [go-nuts] Re: Tracking down RSS growth in cgo library

2020-05-24 Thread Justin Israel
On Mon, May 25, 2020, 7:12 AM Ian Lance Taylor  wrote:

> On Sat, May 23, 2020 at 8:39 PM Justin Israel 
> wrote:
> >
> > On Sat, May 23, 2020 at 5:19 PM Justin Israel 
> wrote:
> >>
> >> I've been working to track this down for 2 days now and I'm just taking
> a long shot to see if anyone might have a new idea for me.
> >> My cgo-based bindings library seems to have unbounded RSS memory
> growth, which I have been able to reduce to the smallest benchmark test and
> even pinpoint the exact call, but the reason behind it still eludes me.
> >> The context is that I have a struct in C++ that will store a const
> char* for the last exception that was thrown, as a strdup() copy which gets
> cleaned up properly each time.
> >>
> >> typedef struct _HandleContext {
> >> HandleId handle;
> >> const char* last_error;
> >> } _HandleContext;
> >>
> >> const char* getLastError(_HandleContext* ctx);
> >>
> >> On the Go side, I have a function for lastError() to return the last
> error value
> >>
> >> func (c *Config) lastError() error {
> >> err := C.getLastError(c.ptr)
> >> if err == nil {
> >> return nil
> >> }
> >> e := C.GoString(err)
> >> if e == "" {
> >> return nil
> >> }
> >> runtime.KeepAlive(c)
> >> // return nil  // <- would result in no memory growth
> >> return errors.New(e)  // <- results in memory growth
> >> }
> >>
> >> What I am seeing in my benchmark test is that the RSS grows something
> like 20MB a second, yet the GODEBUG=gctrace=1 and the pprof memory profile
> don't reflect this memory usage at all, aside from showing a hotspot (in
> pprof) being the GoString() call:
> >>
> >> gc 4 @4.039s 0%: 0.006+0.14+0.003 ms clock,
> 0.024+0.10/0.039/0.070+0.014 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
> >> gc 5 @6.857s 0%: 0.003+0.20+0.004 ms clock,
> 0.015+0.069/0.025/0.15+0.016 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
> >> ...
> >> gc 26 @69.498s 0%: 0.005+0.12+0.003 ms clock,
> 0.021+0.10/0.044/0.093+0.014 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
> >> // 800MB RSS usage
> >> gc 27 @71.824s 0%: 0.006+2.2+0.003 ms clock,
> 0.025+0.063/0.058/0.11+0.014 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
> >>
> >> (pprof) top10
> >> Showing nodes accounting for 46083.69kB, 100% of 46083.69kB total
> >> Showing top 10 nodes out of 19
> >>   flat  flat%   sum%cum   cum%
> >> 30722.34kB 66.67% 66.67% 30722.34kB 66.67%  <...>._Cfunc_GoStringN
> (inline)
> >>  7168.11kB 15.55% 82.22%  7168.11kB 15.55%  errors.New (inline)
> >>  3073.16kB  6.67% 88.89% 46083.69kB   100%  <...>.testLeak
> >>  1536.02kB  3.33% 92.22%  1536.02kB  3.33%
> <...>.(*DisplayTransform).SetInputColorSpace.func1
> >>  1024.02kB  2.22% 94.44%  1024.02kB  2.22%
> <...>.(*Config).NumViews.func1
> >>  1024.02kB  2.22% 96.67%  1024.02kB  2.22%  <...>.(*Config).View.func1
> >>   512.01kB  1.11% 97.78%   512.01kB  1.11%
> <...>.(*DisplayTransform).SetView.func1
> >>   512.01kB  1.11% 98.89%   512.01kB  1.11%  <...>._Cfunc_GoString
> (inline)
> >>   512.01kB  1.11%   100%   512.01kB  1.11%  <...>.newProcessor (inline)
> >>  0 0%   100%   512.01kB  1.11%
> <...>.(*Config).ColorSpaceNameByIndex
> >>
> >> Regardless of whether I ignore the error return value in my test, it
> grows. If I return nil instead of errors.New(e), it will stay around 20MB
> RSS.
> >>
> >> I MUST be doing something stupid, but I can't see any reason for the
> memory growth based on returning this string wrapped in an error. At first
> I thought I was leaking in C/C++ but it a led to this one factor on the Go
> side. Any tips would help greatly, since I have tried debug GC output,
> pprof reports, valgrind, address sanitizer, and refactoring the entire
> memory management of my C bindings layer.
> >>
> >> Justin
> >>
> >
> > Well I seem to have resolved the leak, which was due to a poor
> assumption on my part about the frequency of finalizer execution and being
> tied to a GC cycle. Are finalizers executed on every GC cycle, or are they
> maybe executed on a GC cycle but not sooner than?
> > My library creates finalizers to ensure C memory is freed at some point,
> but I also have Destroy() methods to immediately free them (and clear
> finalizers). So I think it was a combination of the test not generating
> enough Go garbage to clean up the more significant C memory, and not being
> explicit enough with Destroy calls. I look to have also had a situation
> where I wasn't cleaning up C strings as fast as I could have been, so that
> also helps to clear them more quickly before a Destroy or a finalizer runs.
> >
> > As much as I thought I knew about the caveats of finalizers and using
> them to release C resources, I still likely made faulty assumptions.
>
> Finalizers are strictly best effort.
>
> Also, if a Go memory object has a finalizer that frees a C memory
> object, it's important to note that the Go garbage collector will be
> basing decisions only on the amount of memory used by the Go object,
> and will not consider the 

[go-nuts] Re: Is there a way to create a global variable inside go routine stack? so that i can access any time, without passing around between methods/functions. Crazy thought !!!..

2020-05-24 Thread adithyasashasai
if i am not wrong, Even the main itself is a go routine, which have global 
variables?


On Monday, May 25, 2020 at 12:23:49 AM UTC+5:30, Saied Seghatoleslami wrote:
>
> Variable scope is a textual (special if you like) concept.   Go routines 
> are a temporal concept.   Does it make sense to think about a global 
> variable in this way? 

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/58ead137-5e3e-4c37-8f35-eed20188da66%40googlegroups.com.


Re: [go-nuts] Re: Tracking down RSS growth in cgo library

2020-05-24 Thread Ian Lance Taylor
On Sat, May 23, 2020 at 8:39 PM Justin Israel  wrote:
>
> On Sat, May 23, 2020 at 5:19 PM Justin Israel  wrote:
>>
>> I've been working to track this down for 2 days now and I'm just taking a 
>> long shot to see if anyone might have a new idea for me.
>> My cgo-based bindings library seems to have unbounded RSS memory growth, 
>> which I have been able to reduce to the smallest benchmark test and even 
>> pinpoint the exact call, but the reason behind it still eludes me.
>> The context is that I have a struct in C++ that will store a const char* for 
>> the last exception that was thrown, as a strdup() copy which gets cleaned up 
>> properly each time.
>>
>> typedef struct _HandleContext {
>> HandleId handle;
>> const char* last_error;
>> } _HandleContext;
>>
>> const char* getLastError(_HandleContext* ctx);
>>
>> On the Go side, I have a function for lastError() to return the last error 
>> value
>>
>> func (c *Config) lastError() error {
>> err := C.getLastError(c.ptr)
>> if err == nil {
>> return nil
>> }
>> e := C.GoString(err)
>> if e == "" {
>> return nil
>> }
>> runtime.KeepAlive(c)
>> // return nil  // <- would result in no memory growth
>> return errors.New(e)  // <- results in memory growth
>> }
>>
>> What I am seeing in my benchmark test is that the RSS grows something like 
>> 20MB a second, yet the GODEBUG=gctrace=1 and the pprof memory profile don't 
>> reflect this memory usage at all, aside from showing a hotspot (in pprof) 
>> being the GoString() call:
>>
>> gc 4 @4.039s 0%: 0.006+0.14+0.003 ms clock, 0.024+0.10/0.039/0.070+0.014 ms 
>> cpu, 4->4->0 MB, 5 MB goal, 4 P
>> gc 5 @6.857s 0%: 0.003+0.20+0.004 ms clock, 0.015+0.069/0.025/0.15+0.016 ms 
>> cpu, 4->4->0 MB, 5 MB goal, 4 P
>> ...
>> gc 26 @69.498s 0%: 0.005+0.12+0.003 ms clock, 0.021+0.10/0.044/0.093+0.014 
>> ms cpu, 4->4->0 MB, 5 MB goal, 4 P
>> // 800MB RSS usage
>> gc 27 @71.824s 0%: 0.006+2.2+0.003 ms clock, 0.025+0.063/0.058/0.11+0.014 ms 
>> cpu, 4->4->0 MB, 5 MB goal, 4 P
>>
>> (pprof) top10
>> Showing nodes accounting for 46083.69kB, 100% of 46083.69kB total
>> Showing top 10 nodes out of 19
>>   flat  flat%   sum%cum   cum%
>> 30722.34kB 66.67% 66.67% 30722.34kB 66.67%  <...>._Cfunc_GoStringN (inline)
>>  7168.11kB 15.55% 82.22%  7168.11kB 15.55%  errors.New (inline)
>>  3073.16kB  6.67% 88.89% 46083.69kB   100%  <...>.testLeak
>>  1536.02kB  3.33% 92.22%  1536.02kB  3.33%  
>> <...>.(*DisplayTransform).SetInputColorSpace.func1
>>  1024.02kB  2.22% 94.44%  1024.02kB  2.22%  <...>.(*Config).NumViews.func1
>>  1024.02kB  2.22% 96.67%  1024.02kB  2.22%  <...>.(*Config).View.func1
>>   512.01kB  1.11% 97.78%   512.01kB  1.11%  
>> <...>.(*DisplayTransform).SetView.func1
>>   512.01kB  1.11% 98.89%   512.01kB  1.11%  <...>._Cfunc_GoString (inline)
>>   512.01kB  1.11%   100%   512.01kB  1.11%  <...>.newProcessor (inline)
>>  0 0%   100%   512.01kB  1.11%  
>> <...>.(*Config).ColorSpaceNameByIndex
>>
>> Regardless of whether I ignore the error return value in my test, it grows. 
>> If I return nil instead of errors.New(e), it will stay around 20MB RSS.
>>
>> I MUST be doing something stupid, but I can't see any reason for the memory 
>> growth based on returning this string wrapped in an error. At first I 
>> thought I was leaking in C/C++ but it a led to this one factor on the Go 
>> side. Any tips would help greatly, since I have tried debug GC output, pprof 
>> reports, valgrind, address sanitizer, and refactoring the entire memory 
>> management of my C bindings layer.
>>
>> Justin
>>
>
> Well I seem to have resolved the leak, which was due to a poor assumption on 
> my part about the frequency of finalizer execution and being tied to a GC 
> cycle. Are finalizers executed on every GC cycle, or are they maybe executed 
> on a GC cycle but not sooner than?
> My library creates finalizers to ensure C memory is freed at some point, but 
> I also have Destroy() methods to immediately free them (and clear 
> finalizers). So I think it was a combination of the test not generating 
> enough Go garbage to clean up the more significant C memory, and not being 
> explicit enough with Destroy calls. I look to have also had a situation where 
> I wasn't cleaning up C strings as fast as I could have been, so that also 
> helps to clear them more quickly before a Destroy or a finalizer runs.
>
> As much as I thought I knew about the caveats of finalizers and using them to 
> release C resources, I still likely made faulty assumptions.

Finalizers are strictly best effort.

Also, if a Go memory object has a finalizer that frees a C memory
object, it's important to note that the Go garbage collector will be
basing decisions only on the amount of memory used by the Go object,
and will not consider the amount of memory used by a C object.  It's
easy for small Go objects to be associated with large C objects, and
for the Go garbage collector to decide that 

[go-nuts] Is there a way to create a global variable inside go routine stack? so that i can access any time, without passing around between methods/functions. Crazy thought !!!..

2020-05-24 Thread saied
Variable scope is a textual (special if you like) concept.   Go routines are a 
temporal concept.   Does it make sense to think about a global variable in this 
way? 

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/75b7f323-8e05-4a95-bfc9-5033f2c9546e%40googlegroups.com.


[go-nuts] ssh server: requiring both public key auth and keyboard-interactive auth?

2020-05-24 Thread Brian Candler
When writing an ssh server with golang.org/x/crypto/ssh, is there a way to 
require both public key *and* keyboard interactive authentication for the 
same login?

With openssh server you can configure:
AuthenticationMethods publickey,keyboard-interactive:pam

and the client shows:

...
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/brian/.ssh/id_rsa
debug1: Server accepts key: pkalg rsa-sha2-512 blen 279
Authenticated with partial success.
debug1: Authentications that can continue: keyboard-interactive
debug1: Next authentication method: keyboard-interactive
...

But I haven't been able to find a way to do this with the go ssh server.  
What I find is that if my PublicKeyCallback returns nil error, and the 
client proceeds to authenticate successfully with the selected key, then 
KeyboardInteractiveCallback is not called.

I got as far in the code as here 
, which 
AFAICS will terminate authentication as soon as any one method is 
successful, but I just wondered if I've missed something.

Thanks,

Brian.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/466ea520-d625-4c19-9dcb-5b0b49628a64%40googlegroups.com.


[go-nuts] Instrumenting in Go and code generation

2020-05-24 Thread Sergey Kamardin
Hello Gophers,

I just wanted to share an article and open source tool that I've
finished recently.

They both are about instrumenting (aka tracing) Go components.
Article covers some background on it, while tool helps to generate
boilerplate code to easily provide tracing hooks in your structs.

Article:
https://gbws.io/articles/instrumentation-in-go/

The tool:
https://github.com/gobwas/gtrace

Hope it would be helpful!

-- 
Regards,
Sergey.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/20200524181654.GA52504%40MacBook-Pro-Sergej.local.