takeFirstTime returns the first non-zero time.Time.
(values ...time.Time)
| 902 | |
| 903 | // takeFirstTime returns the first non-zero time.Time. |
| 904 | func takeFirstTime(values ...time.Time) time.Time { |
| 905 | for _, v := range values { |
| 906 | if !v.IsZero() { |
| 907 | return v |
| 908 | } |
| 909 | } |
| 910 | return time.Time{} |
| 911 | } |
| 912 | |
| 913 | // mustWorkspaceAppByWorkspaceAndBuildAndAppID finds a workspace app by |
| 914 | // workspace ID, build number, and app ID. It returns the workspace app |