003-embed

command
v0.0.0-...-f411b90 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: MIT Imports: 4 Imported by: 0

README

This example shows how to conditionally use the //go:embed directive to map an asset group to the filesystem, or to an embed.FS virtual one.

# run using the filesystem directly, 
go run main.go

# or run using the embed FS mounted one
go run -tags prod main.go
2022/08/05 14:27:55 [GET] /main.js 4.867379ms

Load one file:

curl http://localhost:6699/main.js
alert("Hello!");
alert("Gopher!")
``

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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