example

command
v0.0.0-...-f568fcc Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2016 License: BSD-3-Clause Imports: 2 Imported by: 0

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

Jump to

Keyboard shortcuts

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