Small fixes I noticed while perusing the code. #269

Merged
durin42 merged 2 commits from small-fixes into master 2015-11-03 10:30:59 -06:00
1 changed files with 17 additions and 4 deletions
Showing only changes of commit f18ea412dc - Show all commits

View File

@ -18,10 +18,22 @@ func setupConfig() (*Config, error) {
return nil, err return nil, err
} }
c.SetString("foo.bar", "baz") err = c.SetString("foo.bar", "baz")
c.SetBool("foo.bool", true) if err != nil {
c.SetInt32("foo.int32", 32) return nil, err
c.SetInt64("foo.int64", 64) }
err = c.SetBool("foo.bool", true)
if err != nil {
return nil, err
}
err = c.SetInt32("foo.int32", 32)
if err != nil {
return nil, err
}
err = c.SetInt64("foo.int64", 64)
if err != nil {
return nil, err
}
return c, err return c, err
} }
@ -86,6 +98,7 @@ func TestConfigLookups(t *testing.T) {
if err != nil { if err != nil {
t.Errorf("Setup error: '%v'. Expected none\n", err) t.Errorf("Setup error: '%v'. Expected none\n", err)
return
} }
defer c.Free() defer c.Free()