a simple customizable tool to embed files in go
features:
-
golint safe code output
-
optional: gzip compression (with optional run-time decompression)
-
optional: formatTed code (gofmt)
-
optional: spread files
-
optional: unexported variables, functions and types
-
optional: include multiple files and folders
-
optional: exclude files or/and folders
-
optional: replace text in files
-
optional: custom base and prefix path
-
Virtual Memory FileSystem - webdav
-
HTTP FileSystem and Handler
-
glob support - doublestar
-
json / yaml support
go get -u github.com/UnnoTed/fileb0x
json config file example b0x.json
fileb0x b0x.json
yaml config file example b0x.yaml
fileb0x b0x.yaml
Name | Type | Description |
---|---|---|
HTTP | var - http.FileSystem | Serve files through a HTTP FileServer http.ListenAndServe(":8080", http.FileServer(static.HTTP)) |
FS | var - webdav.FileSystem | In-Memory File System, you can read, write, remove, stat and rename files, make, remove and stat directories... |
Handler | var - http.Handler | Serve file through a HTTP Handler http.ListenAndServe(":8080", static.Handler) |
ReadFile | func - ioutil.ReadFile | Works the same way as ioutil.ReadFile but the file is read from FS |
WriteFile | func - ioutil.WriteFile | Works the same way as ioutil.WriteFile but the file is written into FS |