title: Golang cannot use type as type in argument
body: <p>I am new to Go language and I am trying to get familiar with interfaces and their assignability. </p>
  
  <p>I am trying to pass an argument from a <code>struct</code> into a <code>function</code> which is imported from another <code>package</code>.</p>
  
  <p><strong>main.go</strong> package:</p>
  
  <pre><code>package main  
  
  import {
    anotherPackage
  }
  
  type I1 interface {
    anotherPackage.I2
  }
  
  type T1 struct {
    *anotherPackage.S1
  }
  
  type T2 struct {
    variable1 T1
  }
  
  type T3 struct {
    variable2 T2
  }
  
  func handler() {
    var fromI I
    var input = T3{}
  
    template := fromI.ExportedFunction(input.T3.variable1)
  }
  
  func main() {
    handler()
  }
  </code></pre>
  
  <p><strong>anotherPackage.go</strong> package</p>
  
  <pre><code>package anotherPackage
  
  type I2 interface {
    ExportedFunction(S1)
  }
  
  type S1 struct {
    Path string
    File string
  }
  
  type S2 struct {}
  
  func (s2 *S2) ExportedFunction(s1 S1) {}
  </code></pre>
  
  <p>I keep getting an error:  </p>
  
  <blockquote>
    <p><code>cannot use input.T3.variable1 (type T1) as type anotherPackage.S1 in argument to fromI.ExportedFunction</code></p>
  </blockquote>