clients

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package clients holds go-partial's browser clients in one file system, for applications that serve, fingerprint and version them with their other assets, such as through an import map:

partial-flash.js         exp/flash's client (flash.ClientScript)
partial-sse.js           exp/sse's client (sse.ClientScript)
partial-interactions.js  exp/interactions' client (interactions.ClientScript)

All lists them with the names scripts import them by, for an import map.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FS

func FS() fs.FS

FS returns the browser clients of go-partial, each under its ClientName.

assets := partial.Overlay(appAssets, clients.FS())

Types

type Client

type Client struct {
	// Import is the module name scripts import it by, such as
	// "partial-flash" for import "partial-flash".
	Import string
	// File is its name in FS, the package's ClientName, such as
	// "partial-flash.js".
	File string
}

Client is one of go-partial's browser clients: the name an import map gives it and its file in FS.

func All

func All() []Client

All returns go-partial's browser clients, for an application that maps each in its import map:

for _, client := range clients.All() {
	importMap.WithFile(client.Import, client.File)
}

Jump to

Keyboard shortcuts

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