Skip to content

x/website: typo in blog/generic-interfaces #76489

@adamsolymos

Description

@adamsolymos

What is the URL of the page with the issue?

https://go.dev/blog/generic-interfaces#a-simple-tree-set

What is your user agent?

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36

Screenshot

Image

What did you do?

I read the documentation

What did you expect to see?

I believe there is a small mistake in the example in the documentation. In the second code example in the section I linked, after the sentence: 'We can remedy that by requiring the user to provide a comparison function' in the first line in the following code example in the comment it says:

// A FuncTree must be created with NewTreeFunc.

but then the following code contains func NewFuncTree[E any](...). Therefore the correct comment line should be

// A FuncTree must be created with NewFuncTree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.FixPendingIssues that have a fix which has not yet been reviewed or submitted.SuggestedIssues that may be good for new contributors looking for work to do.website

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions