Skip to content

WithExpiration of zero or negative value does not #64

@nii236

Description

@nii236

The function comment says the following:

// WithExpiration is an option to set expiration time for any items.
// If the expiration is zero or negative value, it treats as w/o expiration.
func WithExpiration(exp time.Duration) ItemOption {

However, setting 0 or -1 as the expiration causes the item to expire immediately, at odds with the documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions