viewkit

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2025 License: BSD-3-Clause Imports: 8 Imported by: 0

README

ViewKit

Overview

viewkit is a small Go library that helps you build HTML-template–driven web UIs with live reloading of views, embedded assets, and clean routing. It is designed for applications that want a simple, self-contained web interface without pulling in heavy frontend frameworks.

Installation

viewkit can be installed like any other Go library through go get:

  go get github.com/easysy/viewkit@latest

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Path      string
	Title     string
	StartView string
	FuncMap   template.FuncMap
}

type Viewer

type Viewer interface {
	AddSource(name string, data func(*http.Request) any)
	AddView(name, tmpl string, data func(*http.Request) any)
	Inject(router *http.ServeMux)
}

func New

func New(cfg Configuration, static, templates embed.FS) Viewer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL