github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/cmd/internal/bio/must.go (about) 1 // Copyright 2016 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 bio 6 7 import ( 8 "github.com/shogo82148/std/io" 9 ) 10 11 // MustClose closes Closer c and calls log.Fatal if it returns a non-nil error. 12 func MustClose(c io.Closer) 13 14 // MustWriter returns a Writer that wraps the provided Writer, 15 // except that it calls log.Fatal instead of returning a non-nil error. 16 func MustWriter(w io.Writer) io.Writer