https://github.com/va-slyusarev/afs
Another implementation of a virtual file system based on assets embedded in your code.
https://github.com/va-slyusarev/afs
assets code-generation fileserver filesystem
Last synced: 5 months ago
JSON representation
Another implementation of a virtual file system based on assets embedded in your code.
- Host: GitHub
- URL: https://github.com/va-slyusarev/afs
- Owner: va-slyusarev
- License: mit
- Created: 2019-05-04T13:16:16.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-13T13:10:26.000Z (about 7 years ago)
- Last Synced: 2024-06-20T19:17:02.591Z (almost 2 years ago)
- Topics: assets, code-generation, fileserver, filesystem
- Language: Go
- Size: 162 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Assets File System (AFS)
Another implementation of a virtual file system based on assets embedded in your code.
The implementation uses *zlib* compression and *base64* encoding.
## Install
```sh
go get github.com/va-slyusarev/afs/...
```
## Use case
1. Add assets to the catalog;
2. Run `afs/afs` utility by adjusting the appropriate parameters;
3. Add generated class to your code and use.
```go
package main
import (
"log"
"net/http"
"github.com/va-slyusarev/afs"
_ "your/path/which/was/generated" // init assets for afs
)
func main() {
if fs, err := afs.GetAFS(); err == nil {
log.Fatal(http.ListenAndServe(":8080", http.FileServer(fs)))
}
}
```
See `_example`