Skip to content

Handle more duration options #22

Open
@defelmnq

Description

@defelmnq

Serpent's current way to handle time.Duration is directly mapped to how Golang itself is handling it.

As Serpent is a CLI, used mostly with flags, it can lead to situations like --flag 720h for a month or --flag 8760h for a year.

We could add some custom options to make it more readable :

1d for a day
1y for a year

(open to more options)

  • To keep it simple, we can use the time package and time.AddDate() function to ensure consistency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions