Documentation
¶
Overview ¶
This package is an example project that shows an example use for the command fileembed-go.
The program is a small HTTP server that serves one of two HTML files. These HTML files are converted using fileembed-go into a single source file called files.go. When the package is built, the byte array variables declared in files.go have the same contents as the original files, and can be served directly.
If this program was deployed, only the binary would be required. The HTML source files are not required.
Look at the Makefile for an example use. If you are using 'go generate', the following comment is used to create or update files.go.
//go:generate fileembed-go -filename files.go index.html sub.html
Click to show internal directories.
Click to hide internal directories.