UnnoTed / fileb0x

a better customizable tool to embed files in go; also update embedded files remotely without restarting the server
MIT License
634 stars 53 forks source link

How to prefer local file overrides? #41

Closed coolaj86 closed 5 years ago

coolaj86 commented 5 years ago

Let's say that I want to use the in-memory filesystem only when a local file doesn't exist (i.e. the in-memory is the fallback).

Is there some option for fileb0x to handle this?

Or what might be a good way to wrap it to do so?

coolaj86 commented 5 years ago

I suppose the fairly obvious answers is to either to adopt the same interface and do a try on each, wrapping this, or to have fallback in the middleware layer (like Macaroon) where if the previous falls through it's caught by the in-memory handler.