Categorygithub.com/sfomuseum/go-http-sfomuseum/v3
modulepackage
3.1.1
Repository: https://github.com/sfomuseum/go-http-sfomuseum.git
Documentation: pkg.go.dev

# README

go-http-sfomuseum

Go package to provide common elements for SFO Museum web applications, notably headers and footers.

Documentation

Go Reference

Motivation

Aside from providing reusable components for Go-based web applications the hope is that we can use this package to define modular components (templates, CSS, JS) for common elements across all SFO Museum websites, regardless of the application framework or programming language they use.

The templates will not be portable across languages but the idea is for this package to be the reference implementation for things like the navigation header that other application might adapt or supplement as needed.

This package remains under active development. For a list of "known knowns" please consult the Issues section.

Usage

For now, have a look at cmd/example/main.go

# Packages

No description provided by the author
package secure provides security-related methods for SFO Museum web applications.
package static provides static assets for SFO Museum web applications.
No description provided by the author

# Functions

Append all the files in the net/http FS instance containing the embedded SFOMuseum assets to an *http.ServeMux instance.
AppendResourcesHandler will rewrite any HTML produced by previous handler to include the necessary markup to load SFOMuseum JavaScript and CSS files and related assets.
No description provided by the author
Return a *SFOMuseumOptions struct with default paths and URIs.
FileHandlerFromPath will take a path and create a http.FileServer handler instance for the files in its root directory.

# Structs

No description provided by the author
No description provided by the author
SFOMuseumOptions provides a list of JavaScript and CSS link to include with HTML output.