github.com/zhuohuang-hust/src-cbuild@v0.0.0-20230105071821-c7aab3e7c840/pkg/tarsum/writercloser.go (about) 1 package tarsum 2 3 import ( 4 "io" 5 ) 6 7 type writeCloseFlusher interface { 8 io.WriteCloser 9 Flush() error 10 } 11 12 type nopCloseFlusher struct { 13 io.Writer 14 } 15 16 func (n *nopCloseFlusher) Close() error { 17 return nil 18 } 19 20 func (n *nopCloseFlusher) Flush() error { 21 return nil 22 }