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

[go111.go] [not_go111.go] ----go 里边这种命令方式有什么特别用途吗

  •  
  •   xnile · Sep 13, 2019 · 3747 views
    This topic created in 2447 days ago, the information mentioned may be changed or developed.

    https://github.com/golang/net/tree/master/http2 目录下有两个文件没弄明白: [ go111.go ] [ not_go111.go ] 里边函数名是一样,看注释好像是说 go 的版本,go1.11 或非 go1.11 版本,但是搜了一下又没找到出处,不明觉厉。

    2 replies    2019-09-13 14:08:58 +08:00
    moro
        1
    moro  
       Sep 13, 2019
    // +build go1.11
    代码注释里面有,编译的时候会识别。
    搜索“go build tag” 可以找到相关资料。
    xnile
        2
    xnile  
    OP
       Sep 13, 2019
    @moro 感谢指点,找到了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3471 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 10:41 · PVG 18:41 · LAX 03:41 · JFK 06:41
    ♥ Do have faith in what you're doing.