This pull request includes several changes to improve the rendering of HTML elements and add profiling capabilities to the server. The most important changes include modifying the image class in the HTML template and Go code, and adding pprof handlers for profiling.
Improvements to HTML rendering:
render/html_list.templ: Changed the img class to include object-contain for better image scaling.
render/html_list_templ.go: Updated the img class to include object-contain to match the template changes.
Enhancements to server profiling:
render/server.go: Imported the net/http/pprof package to enable profiling.
render/server.go: Added multiple pprof handlers to the HTTP server to handle profiling endpoints, including index, cmdline, profile, symbol, trace, and various pprof handlers like allocs, block, goroutine, heap, mutex, and threadcreate. [1][2]
This pull request includes several changes to improve the rendering of HTML elements and add profiling capabilities to the server. The most important changes include modifying the image class in the HTML template and Go code, and adding pprof handlers for profiling.
Improvements to HTML rendering:
render/html_list.templ
: Changed theimg
class to includeobject-contain
for better image scaling.render/html_list_templ.go
: Updated theimg
class to includeobject-contain
to match the template changes.Enhancements to server profiling:
render/server.go
: Imported thenet/http/pprof
package to enable profiling.render/server.go
: Added multiple pprof handlers to the HTTP server to handle profiling endpoints, includingindex
,cmdline
,profile
,symbol
,trace
, and various pprof handlers likeallocs
,block
,goroutine
,heap
,mutex
, andthreadcreate
. [1] [2]