https://blog.carlmjohnson.net/post/2021/how-to-use-go-embed/ is a more
comprehensive article on using embed.
Tamás Gulácsi a következőt írta (2023. november 20., hétfő, 6:28:44 UTC+1):
> You can convert a io/fs.FS to a http FS with http.FS.
> For an example, see
You can convert a io/fs.FS to a http FS with http.FS.
For an example, see https://stackoverflow.com/a/66248259
Daryl Williams a következőt írta (2023. november 20., hétfő, 0:15:29 UTC+1):
> I am trying to find out if the http server can work with the embed
> filesystem and also use middleware?
I am trying to find out if the http server can work with the embed
filesystem and also use middleware? And if so are there any articles
describing how to do this?
Asks in advance,
Daryl
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To
Hi!
I would like to measure the total time of serving a request. From what
I was looking around, generally one could do that with a middleware
handler, which starts measuring time, calls ServeHTTP of the original
handler, and once ServeHTTP returns, measures the time it took.
But I am not
Thank you for writing and for your valuable feedback Brian. Based on your
feedback, I was going to hold off on releasing my proposed v3 and go with
your suggestion of writing an IsFinite() method so that my module could
panic if it detects that code would run forever.
But I started thinking