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

go: Add strucured header writer #404

Merged
merged 2 commits into from Mar 15, 2019

Conversation

Projects
None yet
3 participants
@irori
Copy link
Collaborator

irori commented Mar 13, 2019

This adds ToString() method to the structured header types, and
uses it from signer.go.

go: Add strucured header writer
This adds ToString() method to the structured header types, and
uses it from signer.go.

@irori irori requested review from hajimehoshi and nyaxt Mar 13, 2019

"unicode"
)

func (ll ListOfLists) ToString() (string, error) {

This comment has been minimized.

Copy link
@hajimehoshi

hajimehoshi Mar 13, 2019

Collaborator

String is more idiomatic in Go.

This comment has been minimized.

Copy link
@irori

irori Mar 13, 2019

Author Collaborator

Doesn't String() usually return just a string? This returns an error too.

This comment has been minimized.

Copy link
@hajimehoshi

hajimehoshi Mar 13, 2019

Collaborator

Right, but using To is not common in Go.

There is an actual usecase of String that also returns error: https://godoc.org/golang.org/x/text/encoding#Decoder.String

This comment has been minimized.

Copy link
@irori

irori Mar 13, 2019

Author Collaborator

Got it, thanks for finding the example. Done.

@hajimehoshi
Copy link
Collaborator

hajimehoshi left a comment

lgtm

@nyaxt

nyaxt approved these changes Mar 15, 2019

@irori irori merged commit f8735d2 into WICG:master Mar 15, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@irori irori deleted the irori:writer branch Mar 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.