初级会员
  • 第 8204 位会员
  • 254244460
  • 254244460@qq.com
  • 2017-04-28 01:48:49
  • Offline
  • 19 0

最近发布的主题

    暂无

最近发布的文章

    暂无

最近分享的资源

    暂无

最近发布的项目

    暂无

最近的评论

  • // Unix returns t as a Unix time, the number of seconds elapsed // since January 1, 1970 UTC. The result does not depend on the // location associated with t. // Unix-like operating systems often record time as a 32-bit // count of seconds, but since the method here returns a 64-bit // value it is valid for billions of years into the past or future. func (t Time) Unix() int64 { return t.unixSec() } // UnixNano returns t as a Unix time, the number of nanoseconds elapsed // since January 1, 1970 UTC. The result is undefined if the Unix time // in nanoseconds cannot be represented by an int64 (a date before the year // 1678 or after 2262). Note that this means the result of calling UnixNano // on the zero Time is undefined. The result does not depend on the // location associated with t. func (t Time) UnixNano() int64 { return (t.unixSec())*1e9 + int64(t.nsec()) } 写代码前就不能看看文档吗?Unix是秒级的,UnixNano才是纳秒。。。
  • ```go package main import "fmt" type foo int func (f foo) Print() { fmt.Println(f) } func main() { fn := foo.Print fn(5) foo.Print(6) } ``` 方法又怎样。。怎样也没问题。接收器实际上就是第一个参数
  • 评论了主题 关于切片的一个问题
    [a:b] ab的取值范围是0>=a>=b>=len() a=len()似乎没什么意义,但是有时可以简化代码逻辑
  • 写得太具体了。。后面一堆破事都没耐心看完。
  • 并行天然就是乱序的,想顺序必须同步,同步包(sync)了解一下。