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

errors: Printer.Printf does not define semantics #30682

Open
rogpeppe opened this issue Mar 8, 2019 · 1 comment
Open

errors: Printer.Printf does not define semantics #30682

rogpeppe opened this issue Mar 8, 2019 · 1 comment
Labels
Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@rogpeppe
Copy link
Contributor

rogpeppe commented Mar 8, 2019

$ go version
go version devel +91170d7201 Thu Mar 7 15:36:29 2019 +0000 linux/amd64

The new errors.Printer interface defines a Printf method, but does not document its semantics.
This means that when implementing Printer, it's not clear what form the format string should take.

Perhaps we should document that the format and args are as documented by fmt.Printf:

// Printf writes a formatted string. The format and arguments are as defined by fmt.Printf.
Printf(format string, args ...interface{})
@andybons andybons added Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Mar 9, 2019
@andybons andybons added this to the Go1.13 milestone Mar 9, 2019
@andybons
Copy link
Member

andybons commented Mar 9, 2019

@mpvl

@andybons andybons modified the milestones: Go1.13, Go1.14 Jul 8, 2019
@rsc rsc modified the milestones: Go1.14, Backlog Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants