title: Go best practices: function vs method with ambiguous receiver?
body: <p>What are the best practices around when to use methods vs. functions in Go? </p>
  
  <p>Specifically, I have 2 structs: <code>probeManager</code> and <code>probeWorker</code>, and I'm writing a function <code>run</code> which needs to access members of both structs. This could be interpreted as telling the manager to run the worker, or as calling run on the worker and passing the manager for access, or I could just create a run function which takes both as arguments:</p>
  
  <pre><code>func (m *ProbeManager) run(w *ProbeWorker) { ... }
  func (w *ProbeWorker) run(m *ProbeManager) { ... }
  func run(m *ProbeManager, w *ProbeWorker) { ... }
  </code></pre>
  
  <p>Since all 3 approaches are semantically valid, are there any advantages to one approach over another, or does this just come down to personal preference?</p>