MCPcopy
hub / github.com/kopia/kopia / verifyFileLogFormat

Function verifyFileLogFormat

internal/logfile/logfile_test.go:213–226  ·  view source on GitHub ↗
(t *testing.T, fname string, re *regexp.Regexp)

Source from the content-addressed store, hash-verified

211}
212
213func verifyFileLogFormat(t *testing.T, fname string, re *regexp.Regexp) {
214 t.Helper()
215
216 f, err := os.Open(fname)
217 require.NoError(t, err)
218
219 defer f.Close()
220
221 s := bufio.NewScanner(f)
222
223 for s.Scan() {
224 require.True(t, re.MatchString(s.Text()), "log line does not match the format: %q (re %q)", s.Text(), re.String())
225 }
226}
227
228func isUTC() bool {
229 _, offset := clock.Now().Zone()

Callers 1

TestLoggingFlagsFunction · 0.85

Calls 4

HelperMethod · 0.80
OpenMethod · 0.65
CloseMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected