github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/internal/testlog/exit.go (about)

     1  // Copyright 2020 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  
     5  package testlog
     6  
     7  // PanicOnExit0 reports whether to panic on a call to os.Exit(0).
     8  // This is in the testlog package because, like other definitions in
     9  // package testlog, it is a hook between the testing package and the
    10  // os package. This is used to ensure that an early call to os.Exit(0)
    11  // does not cause a test to pass.
    12  func PanicOnExit0() bool
    13  
    14  // SetPanicOnExit0 sets panicOnExit0 to v.
    15  func SetPanicOnExit0(v bool)