diff --git a/AUTHORS.txt b/AUTHORS.txt index 60a8b34..d306efb 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -1,3 +1,4 @@ +Carlos A Becker Dustin Spicuzza Eugene Terentev Kevin Burke diff --git a/Makefile b/Makefile index a1880d1..9c1e055 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,9 @@ race-test: lint $(BUMP_VERSION): go get -u github.com/kevinburke/bump_version +$(WRITE_MAILMAP): + go get -u github.com/kevinburke/write_mailmap + release: test | $(BUMP_VERSION) $(BUMP_VERSION) minor config.go diff --git a/config.go b/config.go index f6a4df3..a734e53 100644 --- a/config.go +++ b/config.go @@ -300,6 +300,12 @@ func Decode(r io.Reader) (*Config, error) { return decodeBytes(b, false, 0) } +// DecodeBytes reads b into a Config, or returns an error if r could not be +// parsed as an SSH config file. +func DecodeBytes(b []byte) (*Config, error) { + return decodeBytes(b, false, 0) +} + func decodeBytes(b []byte, system bool, depth uint8) (c *Config, err error) { defer func() { if r := recover(); r != nil {