[go-nuts] Re: Types like http.Request and slog.LogValuer

2023-07-29 Thread Jens-Uwe Mager
ype that wraps the request and implements LogValuer. Then > you would log the request as > > logger.Debug("req", "r", requestWrapper{r}) > > On Thursday, July 27, 2023 at 10:01:27 AM UTC-4 Jens-Uwe Mager wrote: > >> I am trying to convert some older c

[go-nuts] Types like http.Request and slog.LogValuer

2023-07-27 Thread Jens-Uwe Mager
I am trying to convert some older code to slog and I am running into the issue that if some data structure contains http.Request I get the message: {"time":"2023-07-27T15:49:04.744214+02:00","level":"DEBUG","msg":"req","r":"!ERROR:json: unsupported type: func() (io.ReadCloser, error)"} So I be

Re: [go-nuts] Re: https://go-talks.appspot.com still working?

2023-05-13 Thread Jens-Uwe Mager
jum/orgs";, > "repos_url": "https://api.github.com/users/jum/repos";, > "events_url": "https://api.github.com/users/jum/events{/privacy}";, > "received_events_url": " > https://api.github.com/users/jum/received_events&qu

[go-nuts] https://go-talks.appspot.com still working?

2023-05-13 Thread Jens-Uwe Mager
I tried an older URL of mine and I do get with this URL: https://go-talks.appspot.com/github.com/jum/htempl/slides/htempl.slide This error: Error accessing api.github.com. 403: (https://api.github.com/repos/jum/htempl) Is this my error or is go-talks not working any more? -- You received thi

[go-nuts] Re: godoc.org (and pkg.go.dev) only showing one global function?

2020-06-29 Thread Jens-Uwe Mager
ways be comparable? On Monday, June 29, 2020 at 2:11:31 PM UTC+2, Jens-Uwe Mager wrote: > > I am having problems that some of the docs I am looking at show only one > single line of exported global functions. Example here > > https://godoc.org/golang.org/x/text/language#pkg-in

[go-nuts] godoc.org (and pkg.go.dev) only showing one global function?

2020-06-29 Thread Jens-Uwe Mager
I am having problems that some of the docs I am looking at show only one single line of exported global functions. Example here https://godoc.org/golang.org/x/text/language#pkg-index Running this command: go doc golang.org/x/text/language I get much more exported global functions: ... func Co

[go-nuts] Re: html/template escaping problem

2019-09-11 Thread Jens-Uwe Mager
I finally got a workaround going, and that is to not have any moustache template in the javascript at all. By putting the {{area}} template in an data-xxx attribute of the element I can access this from the javascript. On Monday, September 9, 2019 at 1:53:34 PM UTC+2, Jens-Uwe Mager wrote

Re: [go-nuts] html/template escaping problem

2019-09-09 Thread Jens-Uwe Mager
using the string to be > hex encoded as a URL. Which means most special chars will be converted to > hex representation. > > On Mon, Sep 9, 2019 at 4:53 AM Jens-Uwe Mager > wrote: > >> I am having a problem to properly escape javascript urls in my templates. >> I do

[go-nuts] html/template escaping problem

2019-09-09 Thread Jens-Uwe Mager
I am having a problem to properly escape javascript urls in my templates. I do have the situation where I build a template that is having javascript urls that are from variables in the go program (read from yaml files). The go program generates static html, but the html is supposed to use moust

[go-nuts] Godoc command in the future http server only?

2018-09-04 Thread Jens-Uwe Mager
I am using the godoc command to get the complete documentaion of a package vs. the short form the go doc normally generates. For example the following alias: alias gdf="go list ./...|fzf --preview 'go doc {}' --bind 'enter:execute(godoc {}|less)'" works for me as a nice terminal go documentati

Re: [go-nuts] http: unexpected EOF reading trailer not a temporary error?

2018-04-16 Thread Jens-Uwe Mager
UTC-6, Ian Lance Taylor wrote: > > On Mon, Apr 16, 2018 at 3:09 PM, Jens-Uwe Mager > wrote: > > > > I am checking net.error for the Temporary() condition, and in my very > bad > > network I do see really a lot of errors. While doing a GET request I see > >

[go-nuts] http: unexpected EOF reading trailer not a temporary error?

2018-04-16 Thread Jens-Uwe Mager
I am checking net.error for the Temporary() condition, and in my very bad network I do see really a lot of errors. While doing a GET request I see that http: unexpected EOF reading trailer is not a temporary error, so my retry logic does not kick in. Is this a special case or just an oversig