The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
iscraft

1.16 支持的 embed 怪怪的 觉得上的有点仓促

  •  
  •   iscraft · Dec 25, 2020 · 2515 views
    This topic created in 1966 days ago, the information mentioned may be changed or developed.
    第一行使用 //注释符嵌入后
    第二行就要声明一个变量马上进行使用
    猛的一看感觉这两行毫无关系
    为什么不采用
    var 变量 = go:embed 资源
    这种方式
    3 replies    2020-12-26 16:38:41 +08:00
    cloverstd
        1
    cloverstd  
       Dec 25, 2020
    后面那种方式就要改语法解析和 AST 了
    Mitt
        2
    Mitt  
       Dec 26, 2020 via iPhone
    我是一直都不喜欢 go 这种拿注释当指令用的方式 还不如再加个新语法进去
    reus
        3
    reus  
       Dec 26, 2020 via Android   ❤️ 1
    这是构建系统的特性,不是语言的特性,当然不改语法。
    这类注释有很多: https://golang.org/cmd/compile/#hdr-Compiler_Directives
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   914 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 20:44 · PVG 04:44 · LAX 13:44 · JFK 16:44
    ♥ Do have faith in what you're doing.