prism

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: BSD-3-Clause Imports: 6 Imported by: 1

README

prism

A view library for golang

Example app

Refer to myapp which is implemented using prism

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// the path should resemble templates/layouts/*.html
	LayoutPath string

	// the path should resemble templates/pages/*.html
	PagesPath string

	// the path should resemble templates/partials/*.html
	PartialsPath string

	FS embed.FS
}

type Renderer

type Renderer interface {
	Render(w http.ResponseWriter, templateName string, layoutName string, data interface{})
}

func New

func New(cfg *Config) Renderer

Jump to

Keyboard shortcuts

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