godoc: show synopses for subdirectories in package view
godoc: show synopses for subdirectories in package view

In command-line mode, we were traversing the dir tree with depth
of only 1. This prevented the synopses of sub-directories from being
scanned and showed in the output when a package path was being passed.

Increasing the depth to 2 so that sub-directories of the next
level is also parsed and the synopses gets shown.

Also fixed the comment to reflect that dir can be nil only in
command-line mode now after golang.org/cl/93215

Fixes golang/go#22646

Change-Id: I066a3bc3ba3d9d3a9589f97137e1bc4497a45473
Reviewed-on: https://go-review.googlesource.com/93675
Run-TryBot: Andrew Bonventre <682ad9f487f614f19e8b7cc5d340bdc8e1c1b128@golang.org>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Andrew Bonventre <682ad9f487f614f19e8b7cc5d340bdc8e1c1b128@golang.org>

golang/tools,golang/tools,golang/tools,golang/tools,golang/tools