/ go Public
x/pkgsite, x/website, x/tools/godoc: factory functions are displayed in a way that can cause confusion #40223
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Issues that involve UXD/UXR input
What did you do?
My golang program needs to find out if a path refers to an existing directory. I need to find out how to do that. Here's what I did:
type FileInfo. It contains an
IsDir()function. The description says "A FileInfo describes a file and is returned by Stat and Lstat."
type Filewith a
Stat()function. Unfortunately, to create a
Filestruct, one must actually create a normal file on the filesystem.
Stat(string)function indented under
type FileInfoin the index. Clicked on it. This is the same struct that I just looked at. Where is the top-level
fileinfo, err := os.Stat("temp.txt").
Stattop-level function. This is so strange.
Statfunction is indented under
type FileInfobut it's not actually a method on that struct:
What did you expect to see?
I expected to see
func Stat(name string) (FileInfo, error)unindented, in the top section of the index with the module-level functions. Like this:
What did you see instead?
func Stat(name string) (FileInfo, error)appearing out of order with the other top-level functions in
os, indented under
type FileInfoas if it is a method of
The text was updated successfully, but these errors were encountered: