代码之家  ›  专栏  ›  技术社区  ›  Anh Vinh Huỳnh

Golang文本/模板:无法计算类型字符串中的字段<field>

  •  1
  • Anh Vinh Huỳnh  · 技术社区  · 7 年前

    我习惯了 text/template

    例子: https://play.golang.org/p/uARnrOyG4Th

    但我有个错误: 2009/11/10 23:00:00 Execute: template: Person template:1:19: executing "Person template" at <.id>: can't evaluate field id in type string

    请帮我解决这个问题。根据图书馆的文件,我找不到这个错误。

    1 回复  |  直到 7 年前
        1
  •  2
  •   Pan Ke    7 年前