gitconfigimpl

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataSink

type DataSink struct{}

DataSink write data directly to gitconfig

func NewDataSink

func NewDataSink() DataSink

NewDataSink construct new DataSink

func (DataSink) Add

func (ds DataSink) Add(scope scope.Scope, key string, value string) error

Add add a value to a key

func (DataSink) ReplaceAll

func (ds DataSink) ReplaceAll(scope scope.Scope, key string, value string) error

ReplaceAll modify a setting

func (DataSink) UnsetAll

func (ds DataSink) UnsetAll(scope scope.Scope, key string) error

UnsetAll remove a setting

type DataSource

type DataSource struct{}

DataSource read data directly from gitconfig

func NewDataSource

func NewDataSource() DataSource

NewDataSource construct new DataSource

func (DataSource) Get

func (ds DataSource) Get(scope scope.Scope, key string) (string, error)

Get read the first value for a key

func (DataSource) GetAll

func (ds DataSource) GetAll(scope scope.Scope, key string) ([]string, error)

GetAll read all values for a key

func (DataSource) GetRegexp

func (ds DataSource) GetRegexp(scope scope.Scope, pattern string) (map[string]string, error)

GetRegexp read all values matching a pattern

func (DataSource) List

func (ds DataSource) List(scope scope.Scope) (map[string]string, error)

List show the entire config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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