_059

package
v0.0.0-...-1f145c7 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package solution contains Solution to Challenge #059, run TestSolution for test cases

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Computer

type Computer map[string]*File

Computer represents our in-memory computer for the challenge

func (Computer) CreateFile

func (com Computer) CreateFile(path string, data []byte)

func (Computer) DeleteFile

func (com Computer) DeleteFile(path string)

type File

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

File represents our in-memory file for the challenge

func NewFile

func NewFile(path string, data []byte) *File

func (*File) Append

func (f *File) Append(b []byte)

func (*File) Data

func (f *File) Data() []byte

func (*File) DataCompare

func (f *File) DataCompare(b *File) bool

func (*File) Hash

func (f *File) Hash() Md5hash

func (*File) Path

func (f *File) Path() string

func (*File) Write

func (f *File) Write(b []byte)

type ISync

type ISync interface {
	Sync()
	Async() <-chan struct{}
}

ISync provides interface for file syncing

func NewSyncer

func NewSyncer(src, des Computer) ISync

type Md5hash

type Md5hash [md5.Size]byte

Jump to

Keyboard shortcuts

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