title: Cannot use as type in assignment in go
body: <p>when I compile my code, I get the following error message, not sure why it happens.  Can someone help me point why?  Thank you in advance.</p>
  
  <blockquote>
    <p>cannot use px.InitializePaxosInstance(val) (type PaxosInstance) as
    type *PaxosInstance in assignment</p>
  </blockquote>
  
  <pre><code>type Paxos struct {
      instance   map[int]*PaxosInstance
  }    
  
  type PaxosInstance struct {
      value        interface{}
      decided      bool
  }    
  
  func (px *Paxos) InitializePaxosInstance(val interface{}) PaxosInstance {
      return PaxosInstance {decided:false, value: val}
  }
  
  func (px *Paxos) PartAProcess(seq int, val interface{}) error {  
      px.instance[seq] = px.InitializePaxosInstance(val)
      return nil 
  </code></pre>
  
  <p>}</p>