...

Source file src/github.com/go-openapi/strfmt/conv/duration.go

Documentation: github.com/go-openapi/strfmt/conv

     1  package conv
     2  
     3  import "github.com/go-openapi/strfmt"
     4  
     5  // Duration returns a pointer to of the Duration value passed in.
     6  func Duration(v strfmt.Duration) *strfmt.Duration {
     7  	return &v
     8  }
     9  
    10  // DurationValue returns the value of the Duration pointer passed in or
    11  // the default value if the pointer is nil.
    12  func DurationValue(v *strfmt.Duration) strfmt.Duration {
    13  	if v == nil {
    14  		return strfmt.Duration(0)
    15  	}
    16  
    17  	return *v
    18  }
    19  

View as plain text