util

package
v0.0.0-...-9a7fc0b Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package util has various utilities

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAtomicWriteFile

func NewAtomicWriteFile(filename string) (io.WriteCloser, error)

NewAtomicWriteFile will return a writer which will create a temporary file based on the given filename; which when Close()'ed will be renamed to the given filename. This allows "atomic" update to a file from the perspective of other readers: any open will either get the old file, or the new file in their completion.

func WriteFile

func WriteFile(filename string, b []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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