~emersion/drmdb

a1d07d1179c1bbecb04edfdab31781525437728a — Simon Ser 2 months ago dd9a7cf
Display kernel docs on prop page
2 files changed, 11 insertions(+), 1 deletions(-)

M public/property.html
M server.go
M public/property.html => public/property.html +6 -0
@@ 31,6 31,12 @@
    {{end}}
</dl>

{{if .Doc}}
<h2>Documentation</h2>

<p><pre>{{.Doc}}</pre></p>
{{end}}

<h2>Driver support</h2>

<div class="driver-support">

M server.go => server.go +5 -1
@@ 12,6 12,7 @@ import (

	"git.sr.ht/~emersion/drmdb/database"
	"git.sr.ht/~emersion/drmdb/drmtree"
	"git.sr.ht/~emersion/drmdb/drmdoc"
	"git.sr.ht/~emersion/drmdb/treefmt"
	"git.sr.ht/~emersion/go-drm"
	"git.sr.ht/~emersion/go-hwids"


@@ 319,6 320,8 @@ func New() *echo.Echo {
		}
		propertyName := c.Param("name")

		doc := drmdoc.Prop(objectType, propertyName)

		var property drmtree.Property
		found := false
		var spec interface{}


@@ 375,7 378,8 @@ func New() *echo.Echo {
			Flags      []string
			Spec       interface{}
			Drivers    map[string]bool
		}{propertyName, &property, objectType, flags, spec, drivers})
			Doc        string
		}{propertyName, &property, objectType, flags, spec, drivers, doc})
	})

	e.GET("/formats", func(c echo.Context) error {