chiapos icon indicating copy to clipboard operation
chiapos copied to clipboard

why? afero change to NewMemMapFs very slowly?

Open chengjia2016 opened this issue 3 years ago • 0 comments

package fs

import ( "fmt"

"github.com/spf13/afero"

)

const ( OsType = "os" Mem = "mem" )

var supportedTypes = []string{OsType}

func GetFs(fs string) (afero.Fs, error) { switch fs { case OsType: return afero.NewOsFs(), nil case Mem: return afero.NewMemMapFs(), nil } return nil, fmt.Errorf("unknown filesystem type provided: %s (supported types: %v)", fs, supportedTypes) }

chengjia2016 avatar May 13 '21 12:05 chengjia2016