Re: [go-nuts] Re: slog's use of runtime.Callers() with a skip

2023-08-14 Thread 'Shaun Crampton' via golang-nuts
> > Do you have any evidence to the contrary? Only that when Go 1.12 dropped, our similar function stopped working and that reducing the skip seemed to do the trick. The symptom was that our function would see an assembly file as the caller, which I interpreted to mean that we'd skipped too far.

[go-nuts] Re: slog's use of runtime.Callers() with a skip

2023-08-11 Thread Jonathan Amsterdam
The Go runtime does the right thing. On Friday, August 11, 2023 at 8:58:53 AM UTC-4 jake...@gmail.com wrote: > As far as I can tell, skip works even in the face of inlined functions, at > least when used with runtime.CallersFrames(). It would be surprising to me > if it did not. Do you have an

[go-nuts] Re: slog's use of runtime.Callers() with a skip

2023-08-11 Thread jake...@gmail.com
As far as I can tell, skip works even in the face of inlined functions, at least when used with runtime.CallersFrames(). It would be surprising to me if it did not. Do you have any evidence to the contrary? On Friday, August 4, 2023 at 9:51:34 AM UTC-4 sh...@tigera.io wrote: > I was looking at