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: use omitzero option for time.Time #69905

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 16, 2024

  1. cmd: use omitzero option for time.Time

    The doc of time.Time says:
    Programs using times should typically store and pass them as values,
    not pointers. That is, time variables and struct fields should be of type
    time.Time, not *time.Time.
    
    Since CL 615676 added omitzero option to encoding/json package, we can
    just replace (*time.Time + omitempty) with (time.Time + omitzero).
    
    Change-Id: I5593c4b45af291d015433bd1d164f1c1378db642
    callthingsoff committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    9f0d66f View commit details
    Browse the repository at this point in the history