internal

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureWritable

func EnsureWritable(fs afero.Fs, dir string) error

EnsureWritable checks whether the given directory is writable to the current user, and return an error, if it is not.

Types

type Clock added in v0.5.0

type Clock interface {
	Now() time.Time
}

Clock allows to mock time.Now() in tests.

type MockClock added in v0.5.0

type MockClock time.Time

MockClock returns a canned time.

func (MockClock) Now added in v0.5.0

func (m MockClock) Now() time.Time

Now returns the mocked time.

type SystemClock added in v0.5.0

type SystemClock struct{}

SystemClock returns system time.

func (SystemClock) Now added in v0.5.0

func (SystemClock) Now() time.Time

Now returns the current local time.

Jump to

Keyboard shortcuts

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