<p>Hey guys I'm learning go and it's very exciting! one thing that I don't understand is how time.After works. In the docs this is the definition <a href="https://golang.org/pkg/time/#example_After" rel="nofollow">https://golang.org/pkg/time/#example_After</a></p>
<pre><code>func After(d Duration) <-chan Time
</code></pre>
<p>in the actual source code, it looks like this:</p>
<pre><code>func (t Time) After(u Time) bool
</code></pre>
<p>Why don't I see the definition that looks more like the docs with channels? Am I looking at the wrong thing?</p>
<p><a href="https://github.com/golang/go/blob/master/src/time/time.go" rel="nofollow">https://github.com/golang/go/blob/master/src/time/time.go</a></p>
<hr/>**评论:**<br/><br/>anossov: <pre><p>Yes, you're looking at <a href="https://golang.org/pkg/time/#Time.After" rel="nofollow">(Time) After</a></p>
<p>time.After is in <a href="https://golang.org/src/time/sleep.go?s=4766:4800#L140" rel="nofollow">sleep.go</a></p>
<p>You can click on the function name in the docs to go to the source.</p></pre>lems2: <pre><p>thanks! I wasn't even aware you could click on function names! they really need to make it look like a link or something</p></pre>djherbis: <pre><p>One hint that looks reliable is underline on hover.</p></pre>anossov: <pre><p>Everything that's blue is a link.</p></pre>TheMerovius: <pre><p>No, this is wrong, specifically for godoc. Looking, for example, at <a href="https://golang.org/pkg/net/http/" rel="nofollow">this</a>, the global Header isn't a link, the section headers aren't, the "type/func" parts of headers aren't, neither are the receiver parts of the headers.</p>
<p>I agree that, personally, I never found it hard to identify links in the doc, but you shouldn't shut down someone who does by saying "everything that's blue", especially if it's not even correct.</p></pre>
![](https://static.golangjob.cn/static/img/banner.png)