File: testing.go

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

import (
	"testing"
	"time"
)

func mustParseTime(t *testing.T, value string) time.Time {
	t.Helper()

	ts, err := time.Parse(time.RFC3339, value)
	if err != nil {
		t.Fatalf("parse time: value %v: %v", value, err)
	}
	return ts
}