github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/pkg/tarsum/writercloser.go (about)

     1  package tarsum // import "github.com/demonoid81/moby/pkg/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  }