mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-15 00:31:30 -05:00
Bumps [github.com/kovidgoyal/imaging](https://github.com/kovidgoyal/imaging) from 1.7.2 to 1.8.17. - [Release notes](https://github.com/kovidgoyal/imaging/releases) - [Changelog](https://github.com/kovidgoyal/imaging/blob/master/.goreleaser.yaml) - [Commits](https://github.com/kovidgoyal/imaging/compare/v1.7.2...v1.8.17) --- updated-dependencies: - dependency-name: github.com/kovidgoyal/imaging dependency-version: 1.8.17 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
30 lines
451 B
Go
30 lines
451 B
Go
//go:build linux
|
|
|
|
package magick
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
var _ = fmt.Print
|
|
|
|
func memfd(data []byte) (ans *os.File, err error) {
|
|
fd, err := unix.MemfdCreate("memfile", unix.O_CLOEXEC)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
_, err = unix.Write(fd, data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
_, err = unix.Seek(fd, 0, unix.SEEK_SET)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
ans = os.NewFile(uintptr(fd), "memfile")
|
|
return
|
|
}
|