Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 653 Bytes

README.md

File metadata and controls

41 lines (29 loc) · 653 Bytes

vfsgen-sample

An sample of using embedded files in Go.

Build

# with makefile (recommended)
make

# with commands
cd data && go generate -tags dev && cd -
go build

Cleanup

# makefile
make clean

# or
go clean
rm -f data/assets_vfsdata.go

Versioning

Using -ldflags:

go build -ldflags '-X main.version=1.0'

Run

Run ./vfsgen-sample after building, then open http://localhost:7070 in your brower to check the served embedded files.

Also view the console log to check whether reading files from vfsgen is okay.

Reference