• Volker Dobler's avatar
    godoc: Allow examples for methods. · cb7d6e37
    Volker Dobler authored
    An example for a method M() of type T can be written as
    func ExampleT_M() { ... }.
    To differentiate between multiple examples for one function, type or
    method a suffix with a lowercase start may be appended to the name
    of the example function, e.g. ExampleFoo_basicUsage.
    
    Fixes #2465.
    
    R=golang-dev, adg, r, rsc, duperray.olivier, r
    CC=golang-dev
    https://golang.org/cl/5440100
    cb7d6e37
doc.go 5.63 KB