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

cmd/vet: validate that time.Format strings are sane #14743

Open
cellofellow opened this issue Mar 10, 2016 · 2 comments
Open

cmd/vet: validate that time.Format strings are sane #14743

cellofellow opened this issue Mar 10, 2016 · 2 comments
Labels
Milestone

Comments

@cellofellow
Copy link

@cellofellow cellofellow commented Mar 10, 2016

vet will let the user know if fmt.Printf strings are incorrect and if the types passed to them are incorrect. It'd be very handy if the also rather specific format for time.Format strings were similarly checked for validity.

@bradfitz bradfitz added this to the Unplanned milestone Apr 10, 2016
@bradfitz bradfitz added the Suggested label Apr 10, 2016
@rugginoso
Copy link
Contributor

@rugginoso rugginoso commented Feb 27, 2017

@cellofellow could you provide some examples of wrong inputs and errors you'll expect?

@agnivade
Copy link
Contributor

@agnivade agnivade commented Nov 10, 2019

fmt.Printf would still print something, albeit not what was intended. But time.Format would simply throw an error. So it's not like a mistake in the time.Format would go unnoticed so easily.

@alandonovan @mvdan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.