title: Golang: Can you wrap a Package in an Interface?
body: <p>I'm writing a simple library to assist with common assertions. </p>
  
  <pre><code>type Test interface {
      Fatalf(string, ...interface{})
  }
  
  func IsTrue(statement bool, message string, test Test) {
      if !statement {
         test.Fatalf(message)
      }
  }
  </code></pre>
  
  <p>I noticed that the <code>log</code> package actually has a compatible implementation of <code>Fatalf(string, ...interface{})</code> and it'd be great if the <code>IsTrue</code> method could be invoked accordingly:</p>
  
  <pre><code>IsTrue(false, "false wasn't true", log)
  </code></pre>
  
  <p>But I get the error <code>use of package log not in selector</code>. Is there any way to use or wrap a package to make this pattern work or is this not possible?</p>