Skip to content
forked from spf13/afero

A *lightweight* FileSystem Abstraction System for Go

License

Notifications You must be signed in to change notification settings

tbhartman/afero

 
 

Repository files navigation

afero-lite

A lightweight FileSystem Abstraction System for Go

Modifications

This is afero, reorganized to avoid bloated binaries when a subset of features is used (aka when net/http is not needed). The following modifications are made:

  • "github.com/spf13/afero replaced with "github.com/tbhartman/afero/lite
  • all root go files are moved to a lite package, except for httpFs.go
  • new aliases are created at the root level to reference exported symbols in lite

Usage

Unless you need NewHttpFs, use the lite package, which is imported as afero.

package main

import "github.com/tbhartman/afero/lite"

func main() {
	var myfs afero.Fs
	myfs = afero.NewOsFs()
	myfs.Stat("myfile")
}

If you need httpFs functionality, import from root:

package main

import (
	"github.com/tbhartman/afero"
)

func main() {
	var myfs afero.Fs
	myfs = afero.NewHttpFs(afero.NewMemMapFs())
}

Versioning

Versioning will follow major and minor releases of afero, but the patch version will update independently as patches to this repo are required!

About

A *lightweight* FileSystem Abstraction System for Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%