profile

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnexpectedProfileKey = errors.New("unexpected key found in profile config")

ErrUnexpectedProfileKey is returned when an unexpected key is found in the profiles file

Functions

This section is empty.

Types

type Profile

type Profile struct {
	// Name is the personal name committer.
	Name string
	// Email is the email of the commiter.
	Email string
}

Profile stores the details of the committer.

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

Storage writes and reads Profiles to the given filesystem

func NewStorage

func NewStorage(fs billy.Filesystem) *Storage

NewStorage returns an instance of Storage configured to use the given filesystem

func (*Storage) Read

func (s *Storage) Read() (map[string]Profile, error)

Read the saved profiles from the filesystem

func (*Storage) Save

func (s *Storage) Save(profiles map[string]Profile) error

Save the given profiles to the filesystem

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL