linebreaks in doctag

This commit is contained in:
Kwitsch 2024-04-17 17:31:47 +00:00
parent 0f6c847529
commit 27c60e74da
1 changed files with 3 additions and 0 deletions

View File

@ -14,8 +14,11 @@ type TTLInput interface {
}
// ToTTL converts the input to a TTL of seconds as uint32.
//
// If the input is of underlying type time.Duration, the value is converted to seconds.
//
// If the input is negative, the TTL is set to 0.
//
// If the input is greater than the maximum value of uint32, the TTL is set to math.MaxUint32.
func ToTTL[T TTLInput](input T) uint32 {
// use int64 as the intermediate type