Created
          June 5, 2020 14:58 
        
      - 
      
 - 
        
Save aaronstaves/8a026dce719e17732bc7176ab3613072 to your computer and use it in GitHub Desktop.  
    Go methods vs funcs - funcs
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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