# Overlay
[![Go Reference](https://pkg.go.dev/badge/go.jolheiser.com/overlay.svg)](https://pkg.go.dev/go.jolheiser.com/overlay)
Overlay File System
Overlay is an easy way to implement a file system in such a way that
production assets can be overridden by assets on disk.
## Usage
```go
packagemainimport("embed""go.jolheiser.com/overlay")//go:embed assetsvarassetsembed.FSfuncmain(){ofs,err:=overlay.New("/var/lib/myapp/custom",assets)iferr!=nil{panic(err)}...}```If `/var/lib/myapp/custom` has an `assets` sub-directory, this implementation works.
However, if `/var/lib/myapp/custom` matches the `assets` directory layout,
you can use `WithSub` like so...
```go
packagemainimport("embed""go.jolheiser.com/overlay")//go:embed assetsvarassetsembed.FSfuncmain(){ofs,err:=overlay.New("/var/lib/myapp/custom",assets,overlay.WithSub("assets"))iferr!=nil{panic(err)}...}```## License
[MIT](LICENSE)