Skip to content

Instantly share code, notes, and snippets.

@aaronstaves
Created June 5, 2020 14:58
Show Gist options
  • Save aaronstaves/8a026dce719e17732bc7176ab3613072 to your computer and use it in GitHub Desktop.
Save aaronstaves/8a026dce719e17732bc7176ab3613072 to your computer and use it in GitHub Desktop.
Go methods vs funcs - funcs
func DoDBThing(newrelic *newrelic.Application, myDB dynamo.IClient, querythinger string) error {
newrelic.txn() // whatever
myDB.query(querythinger, s.newrelic)
}
func DoServiceThing(newrelic *newrelic.Application, myService *sling.Sling, querythinger string) error {
newrelic.txn() // whatever
myService.Do(querythinger, newrelic)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment