Files
syncthing/lib/model/testos_test.go
T
Jakob BorgandGitHub 8ea09c0094 chore: style fixes from go fix (#10846)
Just `go fix ./...`

Signed-off-by: Jakob Borg <jakob@kastelo.net>
2026-08-05 20:23:22 +02:00

28 lines
559 B
Go

// Copyright (C) 2019 The Syncthing Authors.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.
package model
// fatal is the required common interface between *testing.B and *testing.T
type fatal interface {
Fatal(...any)
Helper()
}
func must(f fatal, err error) {
f.Helper()
if err != nil {
f.Fatal(err)
}
}
func mustV[T any](v T, err error) T {
if err != nil {
panic(err)
}
return v
}