Skip to content
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

Merged
merged 2 commits into from
May 11, 2017
Merged

Conversation

shawn-hurley
Copy link
Contributor

@shawn-hurley shawn-hurley commented May 11, 2017

Fix for issue #63

  • Also fixing golint things like comments on export methods and structs

* Also fixing golint things like comments on export methods and structs
Copy link
Contributor

@jmrodri jmrodri left a 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.
Copy link
Contributor

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)
Copy link
Contributor

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)
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@jmrodri jmrodri merged commit bbbd070 into master May 11, 2017
@jmrodri jmrodri mentioned this pull request May 11, 2017
@jmrodri jmrodri deleted the cleanup-dao-redundancy branch May 12, 2017 02:07
shawn-hurley pushed a commit to shawn-hurley/ansible-service-broker that referenced this pull request Nov 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants