Reduce amount of error printing when reading bookmarks

This commit is contained in:
Dan Sosedoff 2015-03-03 20:14:18 -06:00
parent fe9d7e459d
commit 96bcaa5baa

View File

@ -22,19 +22,13 @@ type Bookmark struct {
func readServerConfig(path string) (Bookmark, error) { func readServerConfig(path string) (Bookmark, error) {
bookmark := Bookmark{} bookmark := Bookmark{}
buff, err := ioutil.ReadFile(path)
buff, err := ioutil.ReadFile(path)
if err != nil { if err != nil {
fmt.Println(err)
return bookmark, err return bookmark, err
} }
_, err = toml.Decode(string(buff), &bookmark) _, err = toml.Decode(string(buff), &bookmark)
if err != nil {
fmt.Println(err)
}
return bookmark, err return bookmark, err
} }
@ -67,7 +61,7 @@ func readAllBookmarks() (map[string]Bookmark, error) {
config, err := readServerConfig(fullPath) config, err := readServerConfig(fullPath)
if err != nil { if err != nil {
fmt.Println(err) fmt.Printf("%s parse error: %s\n", fullPath, err)
continue continue
} }