Skip to content

x/tools/cmd/godoc: public methods of unexported embedded interfaces not shown. #16043

@cznic

Description

@cznic

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?

tip @ 3c6b668

  1. What operating system and processor architecture are you using (go env)?

N/A

  1. What did you do?

If possible, provide a recipe for reproducing the error.

jnml@4670:~/src/tmp$ echo $GOPATH 
/home/jnml
jnml@4670:~/src/tmp$ cat tmp.go 
package foo

type t interface {
    Public()
}

type T interface {
    t
}
jnml@4670:~/src/tmp$ godoc tmp T
  1. What did you expect to see?
use 'godoc cmd/tmp' for documentation on the tmp command 

type T interface {
    Public()
    // contains filtered or unexported methods
}
  1. What did you see instead?
use 'godoc cmd/tmp' for documentation on the tmp command 

type T interface {
    // contains filtered or unexported methods
}

FTR: Importing the package and calling method Public on an instance of foo.T compiles just fine.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions