Index | Files

package githubfs

import ""

Package githubfs provides an afero FS that's backed by Useful for testing against master for a repository, especially in cron.


Package Files


func New Uses

func New() afero.Fs

New constructs an instance of GitHubFs. This is a readonly Fs, and calls to Read/Stat will fetch the file from github, before returning a readonly view into the newly fetched files.

type Fs Uses

type Fs struct {
    // readonly view into the backing fs.
    // contains filtered or unexported fields

Fs represents an in-memory filesystem backed by GitHub.

func (*Fs) Name Uses

func (f *Fs) Name() string

Name returns the name of this FileSystem

func (*Fs) Open Uses

func (f *Fs) Open(name string) (afero.File, error)

Open opens a file, returning it or an error, if any happens.

func (*Fs) OpenFile Uses

func (f *Fs) OpenFile(name string, flag int, perm os.FileMode) (afero.File, error)

OpenFile opens a file using the given flags and the given mode.

func (*Fs) Stat Uses

func (f *Fs) Stat(name string) (os.FileInfo, error)

Stat returns a FileInfo describing the named file, or an error, if any happens.

Package githubfs imports 7 packages (graph). Updated 2018-09-30. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).