writer

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Creator

type Creator func(fullPath string, content string) Writer

type FileWriter

type FileWriter struct {
	FullPath string
	Content  string
}

func (*FileWriter) Write

func (f *FileWriter) Write() error

type MemoryWriter

type MemoryWriter struct {
	FullPath string
	Content  string
	OnWrite  func(mw *MemoryWriter) error
}

func (*MemoryWriter) Write

func (m *MemoryWriter) Write() error

type MemoryWriters

type MemoryWriters struct {
	Writers []*MemoryWriter
}

func NewMemoryWriters

func NewMemoryWriters() *MemoryWriters

func (*MemoryWriters) Creator

func (mws *MemoryWriters) Creator(fullPath string, content string) Writer

type Writer

type Writer interface {
	Write() error
}

func NewFileWriter

func NewFileWriter(fullPath string, content string) Writer

Jump to

Keyboard shortcuts

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