1

几周后我放弃了,想不出一种在beego应用程序之间的会话中编码/解码结构的方法。

问题:如何在会话中正确存储结构app1/models/User并在其他进程/应用程序中对其进行解码,app2/models/User而不从 app1 导入任何内容?

在 app2 中,我们确实知道 struct 结构:

struct {
  Name string
  Age    int
}

我为 app1 和 app2 整理了两个示例,不确定它们是否有帮助,因为在 app2 中我无法正确解码结构:(。

https://github.com/TalLandder/app1

https://github.com/TalLandder/app2

4

0 回答 0