package lazybuildinfo ¶
import "golazy.dev/lazybuildinfo"
Constants ¶
const LazyDevBuildInfoPath ¶
LazyDevBuildInfoPath is the lazydev control-plane path for Go build metadata.
GET requests return a no-store JSON snapshot from runtime/debug.ReadBuildInfo. The response includes whether build information was available, the Go version, the main package path, the main module, dependencies, module replacements, and build settings.
const LazyDevBuildInfoPath = "/buildinfo"
Functions ¶
func RegisterLazyDevHandlers ¶
RegisterLazyDevHandlers registers lazydev build metadata endpoints on controlPlane.
This function exists only in lazydev builds. lazyapp normally calls it while aggregating package-owned development handlers onto the application's lazycontrolplane.ControlPlane, so applications that use lazyapp do not need to call it directly. Custom development servers can call it when they create and serve their own control plane.
func RegisterLazyDevHandlers(controlPlane *lazycontrolplane.ControlPlane)
Package lazybuildinfo exposes Go build metadata to development tooling.
In a normal GoLazy application, lazyapp wires this package into the application's lazycontrolplane only for builds compiled with the lazydev build tag. The development panel can then request the endpoint to inspect the Go toolchain version, main module, dependencies, replacements, and build settings reported by runtime/debug.ReadBuildInfo.
Applications rarely need to use this package directly. Use lazyapp when building a GoLazy app; it aggregates lazybuildinfo with the other lazydev control-plane handlers. Direct registration is useful only for custom development servers that create their own lazycontrolplane.ControlPlane.