rename a function

Change-Id: I328ed897f55a0bfcc5b4c806aac18966edb1c990
This commit is contained in:
Brad Fitzpatrick 2012-05-14 01:46:39 +10:00
parent 87059405ea
commit 5f5da19d45
1 changed files with 2 additions and 3 deletions

View File

@ -312,7 +312,7 @@ func Load(filename string) (*Config, error) {
return conf, nil
}
func (config *Config) initAuth() error {
func (config *Config) checkValidAuth() error {
authConfig := config.OptionalString("auth", "")
_, err := auth.FromConfig(authConfig)
return err
@ -328,8 +328,7 @@ func (config *Config) InstallHandlers(hi HandlerInstaller, baseURL string, conte
outerr = fmt.Errorf("%v", err)
}()
err := config.initAuth()
if err != nil {
if err := config.checkValidAuth(); err != nil {
return fmt.Errorf("error while configuring auth: %v", err)
}
prefixes := config.RequiredObject("prefixes")