clean up Config interface
This commit is contained in:
parent
a325db3051
commit
a0b7f37935
2 changed files with 1 additions and 3 deletions
|
|
@ -54,7 +54,7 @@ hosts:
|
||||||
`)()
|
`)()
|
||||||
config, err := ParseConfig("filename")
|
config, err := ParseConfig("filename")
|
||||||
eq(t, err, nil)
|
eq(t, err, nil)
|
||||||
_, err = config.configForHost("github.com")
|
_, err = config.Get("github.com", "user")
|
||||||
eq(t, err, errors.New(`could not find config entry for "github.com"`))
|
eq(t, err, errors.New(`could not find config entry for "github.com"`))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,6 @@ type Config interface {
|
||||||
Get(string, string) (string, error)
|
Get(string, string) (string, error)
|
||||||
Set(string, string, string) error
|
Set(string, string, string) error
|
||||||
Write() error
|
Write() error
|
||||||
configForHost(string) (*HostConfig, error)
|
|
||||||
parseHosts(*yaml.Node) ([]*HostConfig, error)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type NotFoundError struct {
|
type NotFoundError struct {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue