title: golang rpc not returning when struct has a nested struct
body: <p><strong>UPDATE</strong></p>
  
  <p>moving from gob encoding to json fixed the issue. However I would still like to know why this was failing to work with gob.</p>
  
  <p>so my client code looks like this</p>
  
  <pre><code>account := new(database.Account)
  
  err := client.Call("AccountDb.FindAccount", "username", account)
  
  if err != nil {
      logger.FATAL.Print(err.Error())
      return
  }
  
  logger.INFO.Print(account)
  </code></pre>
  
  <p>On the server side <code>AccountDb.FindAccount</code> looks like this</p>
  
  <pre><code>func (t *AccountDb) FindAccount(args *string, reply *Account) error {
  
      reply.Username = "this is a test"
  
      return nil
  }
  </code></pre>
  
  <p>The struct for Account looks like this</p>
  
  <pre><code>type Account struct {
      Id           int
      Username     string
      Password     string
      Email        string
      Created      time.Time
      LastLoggedIn time.Time
      AccessLevel  int
  
      Banned struct {
          reason  string
          expires time.Time
      }
  }
  </code></pre>
  
  <p>if I attempt to perform the rpc the requests starts and the server executes the procedure. However the program then hangs and the procedure does not return! If however I remove the Banned anonymous struct from the Account struct it works fine! Why is this? is there a solution to this problem? </p>
  
  <p>edit
  the client and server register code looks like this</p>
  
  <p>Client</p>
  
  <pre><code>client, err = rpc.DialHTTP("tcp", "127.0.0.1:9001")
  
  if err != nil {
      logger.FATAL.Panic(err.Error())
  }
  </code></pre>
  
  <p>Server</p>
  
  <pre><code>defer db.Close()
  
  account := new(database.AccountDb)
  account.Database = db
  
  rpc.Register(account)
  rpc.HandleHTTP()
  l, e := net.Listen("tcp", ":9001")
  
  if e != nil {
      logger.FATAL.Fatal("listen error:", e)
  }
  http.Serve(l, nil)
  </code></pre>