virtual file system for go
package main
import (
"fmt"
"github.com/lazychanger/go-vfs"
_ "github.com/lazychanger/go-vfs/driver/memory"
_ "github.com/lazychanger/go-vfs/driver/os"
"io"
"log"
"os"
)
func main() {
memvfs, _ := filesystem.Open("memory:///?maxsize=1000000")
// more
wd, _ := os.Getwd()
osvfs, _ := filesystem.Open(fmt.Sprintf("os://%s/runtime", wd))
// more
}
- more filesystem driver. eg. s3, etcd