File: duration.go

package info (click to toggle)
golang-github-go-openapi-strfmt 0.23.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 356 kB
  • sloc: sh: 13; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 418 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package conv

import "github.com/go-openapi/strfmt"

// Duration returns a pointer to of the Duration value passed in.
func Duration(v strfmt.Duration) *strfmt.Duration {
	return &v
}

// DurationValue returns the value of the Duration pointer passed in or
// the default value if the pointer is nil.
func DurationValue(v *strfmt.Duration) strfmt.Duration {
	if v == nil {
		return strfmt.Duration(0)
	}

	return *v
}