Skip to content

Commit

Permalink
config: go fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mreiferson committed Aug 21, 2014
1 parent 8cbdf78 commit 870f4ff
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ func NewConfig() *Config {
//
// It returns an error for an invalid option or value.
func (c *Config) Set(option string, value interface{}) error {

c.assertInitialized()

for _, h := range c.configHandlers {
Expand All @@ -161,7 +160,6 @@ func (c *Config) assertInitialized() {

// Validate checks that all values are within specified min/max ranges
func (c *Config) Validate() error {

c.assertInitialized()

for _, h := range c.configHandlers {
Expand All @@ -170,7 +168,6 @@ func (c *Config) Validate() error {
}
}
return nil

}

func (c *Config) setDefaults() error {
Expand All @@ -186,8 +183,7 @@ func (c *Config) setDefaults() error {
return nil
}

type structTagsConfig struct {
}
type structTagsConfig struct{}

// Handle options that are listed in StructTags
func (h *structTagsConfig) HandlesOption(c *Config, option string) bool {
Expand Down Expand Up @@ -322,6 +318,7 @@ func (t *tlsConfig) HandlesOption(c *Config, option string) bool {
}
return false
}

func (t *tlsConfig) Set(c *Config, option string, value interface{}) error {
if c.TlsConfig == nil {
c.TlsConfig = &tls.Config{}
Expand Down

0 comments on commit 870f4ff

Please sign in to comment.