options

package
v7.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package options provides a set of interfaces and functions to define and apply options for file systems.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyOptions

func ApplyOptions[T any](fs *T, opts ...NewFileSystemOption[T])

ApplyOptions is a helper to apply multiple options in a single call.

Types

type DeleteOption

type DeleteOption interface {
	DeleteOptionName() string
}

DeleteOption interface contains function that should be implemented by any custom option to qualify as a delete option. Example: ```

type TakeBackupDeleteOption{}
func (o TakeBackupDeleteOption) DeleteOptionName() string {
	return "take backup"
}
func (o TakeBackupDeleteOption) BackupLocation() string {
	return o.backupLocation
}

```

type NewFileOption

type NewFileOption interface {
	NewFileOptionName() string
}

NewFileOption interface contains function that should be implemented by any custom option to qualify as a new file option.

type NewFileSystemOption

type NewFileSystemOption[T any] interface {
	Option[T]
	NewFileSystemOptionName() string
}

NewFileSystemOption interface contains function that should be implemented by any custom option to qualify as a new file system option.

type Option

type Option[T any] interface {
	Apply(*T)
}

Option interface contains function that should be implemented by any custom option.

Directories

Path Synopsis
Package delete provides options for deleting files and directories in a virtual filesystem.
Package delete provides options for deleting files and directories in a virtual filesystem.
Package newfile provides options for creating new files in a virtual filesystem.
Package newfile provides options for creating new files in a virtual filesystem.

Jump to

Keyboard shortcuts

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