title: Golang type interface {} is interface with no methods
body: <p>Currently Im having something like this</p>
  
  <p>main.go</p>
  
  <pre><code>gojob.NewJob("every 2 second", "pene", func() {
          t := gojob.Custom("pene")
          log.Println(t)
      }, struct {
          Id int
      }{
          1,
      })
  </code></pre>
  
  <p>And my gojob package</p>
  
  <pre><code>func NewJob(t string, name string, c func(), v interface{}) {
      e := strings.Split(t, " ")
      job := process(e)
      job.log = false
      job.name = name
      job.action = c
      job.custom = v
      jobs = append(jobs, job)
  }
  </code></pre>
  
  <p>And </p>
  
  <pre><code>func Custom(name string) interface{} {
      for i := range jobs {
          if jobs[i].name != name {
              continue
          }
          return jobs[i].custom
      }
      return nil
  }
  </code></pre>
  
  <p>Thing is the function Im passing to NewJob is beeing executed every 2 seconds on a goroutine but I want to access the anonymous struct I passed... however when I try to access</p>
  
  <blockquote>
    <p>t.Id</p>
  </blockquote>
  
  <p>Im getting </p>
  
  <blockquote>
    <p>t.Id undefined (type interface {} is interface with no methods)</p>
  </blockquote>
  
  <p>However printing t gives me the expected result</p>
  
  <blockquote>
    <p>{1}</p>
  </blockquote>