Skip to content

lazychanger/go-vfs

Repository files navigation

go-vfs

codecov Go MIT

virtual file system for go

How to use

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

}

Features

  • more filesystem driver. eg. s3, etcd