// symbolDoc prints the docs for symbol. There may be multiple matches.
// If symbol matches a type, output includes its methods factories and associated constants.
// If there is no top-level symbol, symbolDoc looks for methods that match.
And then printMethodDoc first searches for a struct type's methods, and then goes to an interface type's methods. Which is what we see here.
So just to clarify- go doc os.Sync gives
func (f *File) Sync() error
Sync commits the current contents of the file to stable storage. Typically,
this means flushing the file system's in-memory copy of recently written
data to disk.
which is correct, but go doc os.ModTime is not ?
Should the correct behavior be only to check struct's methods if there is no top-level symbol, or to not check any method at all (in which case, it is even a bigger behavior change) ?
That is clearly wrong, as there is no such function in the os package.
The output of go doc os.Sync correctly reports that Sync is a method of File.
The path to resolution is known, but the work has not been done.
Feedback is required from experts, contributors, and/or the community before a change can be made.
May 22, 2019