temporary

package
v0.0.0-...-7e42488 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Directory

func Directory() (string, error)

Directory creates a temporary directory and returns the path or an error.

func WithDirectory

func WithDirectory(callback Callback) (interface{}, error)

WithDirectory creates a temporary directory and invokes the callback and returns the result.

func WithFile

func WithFile(content []byte, permission os.FileMode, callback Callback) (interface{}, error)

WithFile creates a temporary file with content and permissions, invokes the callback and returns the result.

Types

type Callback

type Callback func(path string) (interface{}, error)

Callback defines the callback function signature.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL