support.go 344 B

1234567891011121314151617
  1. // Copyright 2022 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package pkgbits
  5. import "fmt"
  6. func assert(b bool) {
  7. if !b {
  8. panic("assertion failed")
  9. }
  10. }
  11. func errorf(format string, args ...interface{}) {
  12. panic(fmt.Errorf(format, args...))
  13. }