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

Option to format time.Time #85

Open
dennypenta opened this issue Dec 7, 2023 · 1 comment
Open

Option to format time.Time #85

dennypenta opened this issue Dec 7, 2023 · 1 comment

Comments

@dennypenta
Copy link

The problem:
I have a struct with a bunch of populated fields.
I want to print the struct in order to use it in my unit test as data input and not to describe it manually.

The library fits it well, but a few formatting options are missing.

The solution
Add an optional formatting for fields like time.Time and may be the others, instead of raw string value I would like to see:

time.Date(1, 2, 3, 5, 6, 7, time.Local)

Any questions/concerns regarding the feature?

@k0kubun
Copy link
Owner

k0kubun commented Dec 9, 2023

The logic to format time.Date(1, 2, 3, 5, 6, 7, time.Local) is implemented by the user and not in the pp side, right? Then I'm open to merging a pull request that adds such a customization capability, assuming the patch would not be too complicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants