Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encoding/gob: doc.go is out of date #30656

Closed
D1CED opened this issue Mar 7, 2019 · 2 comments
Closed

encoding/gob: doc.go is out of date #30656

D1CED opened this issue Mar 7, 2019 · 2 comments
Assignees

Comments

@D1CED
Copy link

@D1CED D1CED commented Mar 7, 2019

It does reproduce in Go 1.12 and my guess it is outdated since Go 1.2.

The section on encoding details does not reflect changes made to wireType.
Current documentation:

type wireType struct {
    ArrayT  *ArrayType
    SliceT  *SliceType
    StructT *StructType
    MapT    *MapType
}

Actual:

type wireType struct {
    ArrayT           *arrayType
    SliceT           *sliceType
    StructT          *structType
    MapT             *mapType
    GobEncoderT      *gobEncoderType
    BinaryMarshalerT *gobEncoderType
    TextMarshalerT   *gobEncoderType
}

I also suggest adding gobEncoderType to this section. Also to mention is that the types in the documentation are incorrectly capitalized (arrayType, not ArrayType).

Edit: Quick link https://golang.org/pkg/encoding/gob/#hdr-Encoding_Details

@agnivade
Copy link
Contributor

@agnivade agnivade commented Mar 7, 2019

/cc @robpike

@robpike robpike self-assigned this Mar 7, 2019
@gopherbot
Copy link

@gopherbot gopherbot commented Mar 8, 2019

Change https://golang.org/cl/166177 mentions this issue: encoding/gob: update documentation in doc.go for wireType

@robpike robpike changed the title Outdated documentation: encoding/gob encoding details encoding/gob: doc.go is out of date Mar 8, 2019
@gopherbot gopherbot closed this in 6c6a0a1 Mar 8, 2019
@golang golang locked and limited conversation to collaborators Mar 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.