-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing redundancy in dao for issue #63 #105
Conversation
* Also fixing golint things like comments on export methods and structs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All in all, good stuff. Just 2 minor things:
- space after //
- use if err := ... ; err != nil style
Thanks again!
pkg/dao/dao.go
Outdated
@@ -10,11 +10,13 @@ import ( | |||
logging "github.com/op/go-logging" | |||
) | |||
|
|||
//Config - confg holds etcd host and port. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a space after the //
not a golint check, but a zeus check. I prefer the space 😄
pkg/dao/dao.go
Outdated
func (d *Dao) GetSpec(id string) (*apb.Spec, error) { | ||
raw, err := d.GetRaw(specKey(id)) | ||
spec := &apb.Spec{} | ||
err := d.getObject(specKey(id), spec) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also change it to include the error check in the same line.
if err := d.getObject(specKey(id), spec); err != nil {
return nil, err
}
I know it will result in more changes, but I think it looks better than what we had.
} | ||
return d.SetRaw(key, payload) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Fix for issue #63