github.com/criyle/go-sandbox@v0.10.3/pkg/memfd/memfd_other.go (about)

     1  //go:build !linux
     2  
     3  package memfd
     4  
     5  import (
     6  	"fmt"
     7  	"io"
     8  	"os"
     9  	"runtime"
    10  )
    11  
    12  var errNotImplemented = fmt.Errorf("memfd: unsupported on platform %s", runtime.GOOS)
    13  
    14  func New(name string) (*os.File, error) {
    15  	return nil, errNotImplemented
    16  }
    17  
    18  func DupToMemfd(name string, reader io.Reader) (*os.File, error) {
    19  	return nil, errNotImplemented
    20  }