gitconfig

package
v1.5.18 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidEscapeSequence indicates that the escape character ('\')
	// was followed by an invalid character.
	ErrInvalidEscapeSequence = errors.New("unknown escape sequence")

	// ErrUnfinishedQuote indicates that a value has an odd number of (unescaped) quotes
	ErrUnfinishedQuote = errors.New("unfinished quote")

	// ErrMissingEquals indicates that an equals sign ('=') was expected but not found
	ErrMissingEquals = errors.New("expected '='")

	// ErrPartialBOM indicates that the file begins with a partial UTF8-BOM
	ErrPartialBOM = errors.New("partial UTF8-BOM")

	// ErrInvalidKeyChar indicates that there was an invalid key character
	ErrInvalidKeyChar = errors.New("invalid key character")

	// ErrInvalidSectionChar indicates that there was an invalid character in section
	ErrInvalidSectionChar = errors.New("invalid character in section")

	// ErrUnexpectedEOF indicates that there was an unexpected EOF
	ErrUnexpectedEOF = errors.New("unexpected EOF")

	// ErrSectionNewLine indicates that there was a newline in section
	ErrSectionNewLine = errors.New("newline in section")

	// ErrMissingStartQuote indicates that there was a missing start quote
	ErrMissingStartQuote = errors.New("missing start quote")

	// ErrMissingClosingBracket indicates that there was a missing closing bracket in section
	ErrMissingClosingBracket = errors.New("missing closing section bracket")
)

Functions

func Config

func Config() (*config, error)

func Parse

func Parse(bytes []byte) (map[string]string, uint, error)

Types

type RemoteConfig

type RemoteConfig struct {
	URL          string
	Organization string
	Repository   string
}

func NewRemoteConfig

func NewRemoteConfig(url string) (*RemoteConfig, error)

Jump to

Keyboard shortcuts

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