fileconv

package
v0.0.0-...-79dbd28 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallLevel

type CallLevel int
const (
	LevelSibling CallLevel = iota
	LevelParent
)

type FileLocator

type FileLocator interface {
	AbsPathTo(filename string) string
}

FileLocator provides an absolute path to the file. This is useful for writing data to that file. Loading data from file should be done via go embed.

type Flusher

type Flusher struct{}

func (Flusher) ToFile

func (Flusher) ToFile(filename string, object any) error

type LevelFileLocator

type LevelFileLocator struct {
	// contains filtered or unexported fields
}

func NewLevelFileLocator

func NewLevelFileLocator(level CallLevel) *LevelFileLocator

NewLevelFileLocator creates locator, which is capable of resolving full path to files located relative to the call stack.

func NewSiblingFileLocator

func NewSiblingFileLocator() *LevelFileLocator

NewSiblingFileLocator creates locator, which is capable of resolving full path to files located under the same directory where this constructor was called.

func (LevelFileLocator) AbsPathTo

func (l LevelFileLocator) AbsPathTo(filename string) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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