Skip to content

doc: misaligned text for covariant result types section of FAQ #17170

@StevenMaude

Description

@StevenMaude

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

1.7.1

What did you expect to see?

A body text layout as for the rest of the FAQ, for instance in the "Why is my nil error value not equal to nil?" section:

correct-layout

What did you see instead?

Text that's to the left and right of what's considered the text margins for the FAQ body:

covariant-types-layout

Fix

The inconsistent use of <p> tags is the cause of the difference; see the covariant return section compared with the nil error value section.

Changing the relevant HTML to:

<p>
Covariant result types would mean that an interface like
</p>

<pre>
type Copyable interface {
    Copy() interface{}
}
</pre>

<p>
would be satisfied by the method
</p>

fixes this:

covariant-types-layout-fixed

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions